Bug 9531 – __traits(parent, ...) does not work for types defined within a unittest block

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-18T02:53:00Z
Last change time
2013-10-13T02:09:14Z
Assigned to
nobody
Creator
code

Attachments

IDFilenameSummaryContent-TypeSize
1190repro.drepro caseapplication/octet-stream227

Comments

Comment #0 by code — 2013-02-18T02:53:55Z
Created attachment 1190 repro case Tested with dmd 2.062 See attatched repro case.
Comment #1 by andrej.mitrovich — 2013-02-18T09:34:11Z
Simple test-case: module Fix9531; unittest { struct S { } enum s = __traits(parent, S).stringof; static assert(s == "module Fix9531"); } void main() { } https://github.com/D-Programming-Language/dmd/pull/1677
Comment #2 by andrej.mitrovich — 2013-02-19T12:03:41Z
(In reply to comment #1) > https://github.com/D-Programming-Language/dmd/pull/1677 Wrong pull.
Comment #3 by andrej.mitrovich — 2013-05-13T06:40:57Z
Strange, this seems to have been fixed in git-head. Anyone know which pull did it?