Bug 16461 – Using the fully qualified type of an object within its own scope causes an error

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2016-09-02T08:36:12Z
Last change time
2017-11-01T11:26:09Z
Assigned to
No Owner
Creator
Ethan Watson

Comments

Comment #0 by gooberman — 2016-09-02T08:36:12Z
This one's quite easy to reproduce, and I can probably work around it with a small bit of pain. Had to painstakingly reduce code in a mixin/mixin template combo by hand to get it down to this minimal case, which is another issue entirely... Output: Error: undefined identifier 'Test' in package 'thismodule' Code: module thismodule; struct Test { pragma( msg, thismodule.Test.stringof ); }
Comment #1 by ag0aep6g — 2016-09-02T17:49:24Z
I can't reproduce this with 2.071.1. What version of dmd are you using exactly? Do you just run `dmd -c thismodule.d` or do you use any additional compiler switches?
Comment #2 by gooberman — 2016-09-12T08:15:30Z
Just tested on 2.071.1. Error as described does not occur any more. There is, however, still a forward referencing error somewhere as the code that triggered the bug originally is still not working correctly. I'll come back with another example once I've whittled that one down.
Comment #3 by razvan.nitu1305 — 2017-11-01T11:26:09Z
I guess we can mark this as fixed. Please open a new bug report if you track down the new issue.