/* 注意: このプログラムはコンパイルに失敗する可能性がある。 */ module pind.samples.ja.cast_.cast_7; void calculate(immutable int[] coordinates) { // ... } void main() { int[] numbers; numbers ~= 10; // ... その他のさまざまな変更 ... numbers[0] = 42; calculate(numbers); // ← コンパイルエラー }