module pind.samples.ja.cast_.cast_2; import std.stdio; void foo() { int[2] array = [ 1, 2 ]; bar(array); // 固定長配列をスライスとして渡す } void bar(int[] slice) { writeln(slice); } void main() { foo(); }