Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/diag19022.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag19022.d(16): Error: immutable field `b` initialized multiple times
5 fail_compilation/diag19022.d(15): Previous initialization is here.
6 ---
7 */
8 // https://issues.dlang.org/show_bug.cgi?id=19022
9
10 struct Foo
11 {
12 immutable int b;
13 this(int a)
14 {
15 b = 2;
16 b = 2;
17 }
18 }