mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
18 lines
334 B
D
18 lines
334 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/diag19022.d(16): Error: immutable field `b` initialized multiple times
|
|
fail_compilation/diag19022.d(15): Previous initialization is here.
|
|
---
|
|
*/
|
|
// https://issues.dlang.org/show_bug.cgi?id=19022
|
|
|
|
struct Foo
|
|
{
|
|
immutable int b;
|
|
this(int a)
|
|
{
|
|
b = 2;
|
|
b = 2;
|
|
}
|
|
}
|