[Issue 1256] New: "with" statement with symbol

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 4 09:44:31 PDT 2007


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

           Summary: "with" statement with symbol
           Product: D
           Version: 1.014
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: wstring at gmail.com


The following code was copied from D document:
http://www.digitalmars.com/d/statement.html#WithStatement
with a little modification. The 7th line have caused a compile error "Foo is
not a lvalue".

 void main() {  

     struct Foo {  
         typedef int Y;   
     }  

     with (Foo) { //Error: Foo is not a lvalue  
         Y y;  
     }  
}


-- 



More information about the Digitalmars-d-bugs mailing list