[Issue 1564] New: Forward reference of enum
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Oct  9 21:33:29 PDT 2007
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=1564
           Summary: Forward reference of enum
           Product: D
           Version: 1.022
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: binghe15 at yeah.net
//file1 testA.d
module testa;
import testb;
enum TestEnum {
        A,
}
class CCC{
        int a;
}
struct SSS{
        int a;
}
------------------------------
//file2 testB.d
module testb;
import testa;
TestEnum te;
CCC ccc;
SSS sss;
Compile the testA.d, class and struct are ok, but to enum,dmd say "enum
TestEnum is forward referenced"
This question is divided into these kinds of situations specifically:
1.Compiling two files of above alone separately,DMD and GDC all fail when
compiling testA.d.
   dmd testA.d -c
2.DMD and GDC all fail to Compile two files of above in once,and testA.d in
before testB.d in back.
   dmd testA.d testB.d -c
3.DMD is OK GDC is fail when testB.d in before testA.d in back.
   dmd testB.d testA.d -c
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list