2 days ago [Issue 24867] New: Wrong deprecation warning of @system variable usage under CTFE | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24867 Issue ID: 24867 Summary: Wrong deprecation warning of @system variable usage under CTFE Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: contact@lsferreira.net ``` align(1) struct Bar { align(1) const char* name; } struct Foo { static immutable Bar bar = Bar("foo"); @safe void foo() { static assert(bar == "foo"); } } ``` This raises a deprecation warning, where it shouldn't. This is not a variable but a constant, its not GC tracked, so alignment doesn't particularly matter. -- |
Copyright © 1999-2021 by the D Language Foundation