[Issue 764] New: (typeof(o)).classinfo causes parser error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 28 15:56:42 PST 2006


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

           Summary: (typeof(o)).classinfo causes parser error
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: ddaglas at gmail.com


For the following source code:

void main() {
  Object o = new Object();
  printf("%*s\n", typeof(o).classinfo.name);    // compiles ok
  printf("%*s\n", (typeof(o)).classinfo.name);  // error
}

compilation fails (on win32) with the following message:

main.d(4): found '.' when expecting ','

--- errorlevel 1


-- 



More information about the Digitalmars-d-bugs mailing list