[Issue 1335] New: typedef-1 can't be stored in same typedef

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 11 13:19:56 PDT 2007


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

           Summary: typedef-1 can't be stored in same typedef
           Product: D
           Version: 1.018
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: webmaster at villagersonline.com


The following file fails to compile:

typedef uint foo;

void main() {
  foo f = 100;
  f--; // this works
  foo g = f-1; // this doesn't
}

ERROR MESSAGE:
typedef_problem.d(6): Error: cannot implicitly convert expression (f - 1u) of
type uint to foo


-- 



More information about the Digitalmars-d-bugs mailing list