Bug 7027 – Struct member trySemantic() regression in DMD Git master

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-11-28T14:06:00Z
Last change time
2011-12-07T20:45:49Z
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2011-11-28T14:06:51Z
Reposting this from my mailing list message so it doesn't get lost: https://github.com/D-Programming-Language/dmd/commit/8baaaf675e7d50b1160f81b9a27aef106f584968 introduced a regression concerning __traits(compiles, …): --- struct Foo { int a; } static assert(!__traits(compiles, { return Foo.a; })); --- The assert doesn't pass anymore with the aforementioned commit in place, i.e. __traits(compiles, …) returns true. If the delegate was used in actual code, semantic analysis would later give a »need this« error. I'm not quite sure what the best/correct fix for this is.
Comment #1 by bugzilla — 2011-12-07T14:57:33Z
Thanks for posting this. I found the trouble, and am testing a fix.
Comment #2 by bugzilla — 2011-12-07T20:45:49Z