Summary: Can't forward reference identifier defined within a
Keywords: rejects-valid, spec
--- Comment #0 from nfx...@gmail.com 2010-05-23 10:10:54 PDT ---
$ cat f.d
const x = y;
mixin("const y = "~z~";");
const z = "123";
$ dmd f.d
f.d(1): Error: undefined identifier y, did you mean module f?
It works when you make the line with the mixin the first line.
I'm reporting this mainly because I'm curious whether this example is supposed
to work (i.e. it's a dmd bug), or whether the specification disallows it. I
think it is valid.
(Tested with dmd 1.061.)
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------