https://issues.dlang.org/show_bug.cgi?id=17822
Richard Cattermole <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution|--- |WORKSFORME --- Comment #2 from Richard Cattermole <[email protected]> --- The definition by itself does not error. But it is possible to make it error with a ClassZ linker error if you use new. Works: ```d extern (C++) class CC { int a; } extern(C) void main() { __gshared CC cc = new CC; cc.a = 4; } ``` And so does: ```d extern (C++) class CC { int a; } extern(C) void main() { scope CC cc = new CC; cc.a = 4; } ``` Doesn't: ```d extern (C++) class CC { int a; } extern(C) void main() { CC cc = new CC; cc.a = 4; } ``` With: ``` ./onlineapp.d:6: error: undefined reference to '_D9onlineapp2CC7__ClassZ' ./onlineapp.d:6: error: undefined reference to '_d_newclass' collect2: error: ld returned 1 exit status ``` I'll close this as WORKSFORME, because it seems to be working correctly. --
