[Issue 12827] New: DMD segfaults if the member variable has the same name as the template argument
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat May 31 10:32:58 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12827
Issue ID: 12827
Summary: DMD segfaults if the member variable has the same name
as the template argument
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: minor
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: camille.brugel at laposte.net
DMD segfaults if the member variable has the same name as the template argument
Example of code :
struct Foo(int i)
{
immutable int i = i;
}
void main()
{
Foo!5 foo;
writeln(foo);
}
Output :
app.d(20): Deprecation: variable app.Foo!5.Foo.i immutable field with
initializer should be static, __gshared, or an enum
Segmentation fault (core dumped)
--
More information about the Digitalmars-d-bugs
mailing list