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.
Comment #1 by k.hara.pg — 2012-12-26T19:45:26Z
Comment #2 by github-bugzilla — 2012-12-27T01:45:16Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e1eea06d64d43cfa3bd4b9c36e3bc4d76d8802f8 fix Issue 9213 - [2.061 beta] Member access without this and __traits(compiles, ...) https://github.com/D-Programming-Language/dmd/commit/1650aa5baa43c450b1b5402ebfb9ddec768e0045 Merge pull request #1411 from 9rnsr/fix9213 Issue 9213 - [2.061 beta] Member access without this and __traits(compiles, ...)
Comment #3 by github-bugzilla — 2012-12-28T11:11:06Z
Commit pushed to staging at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/171941e9ee8cd821e50a00a839bfadedbf2b55ac Merge pull request #1411 from 9rnsr/fix9213 Issue 9213 - [2.061 beta] Member access without this and __traits(compiles, ...)