mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00

* Fix 24056 - const uninitialized data at module scope is not in TLS * Update tests * Add changelog entry
17 lines
535 B
D
17 lines
535 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail4923.d(5): Error: immutable variable `bar` initialization is not allowed in `static this`
|
|
fail_compilation/fail4923.d(5): Use `shared static this` instead.
|
|
fail_compilation/fail4923.d(6): Deprecation: const variable `baz` initialization is not allowed in `static this`
|
|
fail_compilation/fail4923.d(6): Use `shared static this` instead.
|
|
---
|
|
*/
|
|
#line 1
|
|
immutable int bar;
|
|
const int baz; // https://issues.dlang.org/show_bug.cgi?id=24056
|
|
static this()
|
|
{
|
|
bar = 42;
|
|
baz = 43;
|
|
}
|