[Bug 145] New: Can't refer to global scope after a cast

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 18 05:03:54 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=145

           Summary: Can't refer to global scope after a cast
           Product: D
           Version: 0.157
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: lio at lunesu.com


#int somefunc(int i) { return i; }
#class someclass{
#//  int somefunc() {...}
#  uint otherfunc(){
#    return cast(uint).somefunc(2);
#  }
#}

C:\dmd>dmd test.d
test.d(5): found '(' when expecting ';' following 'return statement'
test.d(5): found ')' when expecting ';' following 'statement'

C:\dmd>dmd
Digital Mars D Compiler v0.157

If ".somefunc" were in a module, "cast(uint)somemod.somefunc" works just fine.


-- 




More information about the Digitalmars-d-bugs mailing list