https://issues.dlang.org/show_bug.cgi?id=21063

          Issue ID: 21063
           Summary: getLinkage is wrong for forward reference extern(C++)
                    class
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

```
static assert(__traits(getLinkage, Klass) == "C++"); // Succeeds
pragma(msg, __traits(getLinkage, Klass)); // Gets D linkage (Wrong)

extern (C++) class Klass { void a() {} }

static assert(__traits(getLinkage, Klass) == "C++");
pragma(msg, __traits(getLinkage, Klass)); // Correct linkage
```

--

Reply via email to