http://d.puremagic.com/issues/show_bug.cgi?id=3182


Jarrett Billingsley <jarrett.billings...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jarrett.billings...@gmail.c
                   |                            |om




--- Comment #1 from Jarrett Billingsley <jarrett.billings...@gmail.com>  
2009-07-16 08:12:41 PDT ---
I don't think your ideas on the ordering are right.  You can place imports
anywhere in a module and their symbols will be accessible before or after.  For
instance:

[mod.d]
module mod;
void foo() {}

[test.d]
void bar() { foo(); } // fine
import mod;

So, if anything, I'd expect the output to be

z!
z!
z=1!

But the compiler doesn't seem to be doing that.  That the static if before the
import causes later references to 'z' to be invalid is even stranger.  Also, if
you replace 'z' with something else (like "void z(){}"), you get other
behavior, making me think that the semantic analysis is being done differently
for different types.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to