/* 注意: このプログラムはコンパイルに失敗する可能性がある。 */ module pind.samples.ja.special_functions.special_functions_1; struct S { int m; immutable int i; this(int m, int i) { this.m = m; // ← construction this.m = 42; // ← 割り当て (変更可能なメンバーに対して可能) this.i = i; // ← construction this.i = i; // ← コンパイルエラー } } void main() { auto s = S(1, 2); }