https://issues.dlang.org/show_bug.cgi?id=17733
Issue ID: 17733
Summary: idup fails for structs/classes with member functions
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: minor
Priority: P1
Component: druntime
Assignee: [email protected]
Reporter: [email protected]
Test case:
void main() {
struct S {
void f() {}
}
[S()].idup;
}
Also, compilation fails only if struct is defined in same scope idup is called,
so this code works just fine:
struct S {
void f() {}
}
void main() {
[S()].idup;
}
I've tested it with latest dmd, gdc and ldc
--