Bug 9213 – [2.061 beta] Member access without this and __traits(compiles, ...)
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-12-26T15:27:00Z
Last change time
2012-12-28T11:11:06Z
Keywords
pull
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2012-12-26T15:27:05Z
The following program prints "false" with DMD 2.060, but "true" with DMD 2.061:
---
class Foo {
int bar;
}
pragma(msg, __traits(compiles, { return Foo.bar; }));
---
In 2.061, we only emit a "need 'this' to access member bar" glue code error, thus the wrong output.