[Issue 2211] New: new static if bug in 2.016

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 9 13:25:44 PDT 2008


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

           Summary: new static if bug  in 2.016
           Product: D
           Version: 2.016
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: someanon at yahoo.com


http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.announce&artnum=12529

New bug introduced in 2.016  (2.015, 2.013 are ok)

$ ../dmd-v2.016/bin/dmd -c staticif.d
staticif.d(27): Error: no property 'f' for type 'staticif.AA'
staticif.d(27): Error: function expected before (), not 1 of type int
staticif.d(28): Error: no property 'f' for type 'staticif.BB'
staticif.d(28): Error: function expected before (), not 1 of type int

$ cat staticif.d

class A {
}

class B {
}

template T(X) {
static if (is(typeof(X) : A) ||
           is(typeof(X) : B) ) {
void f() {
}
}

}

class AA {
  mixin T!(A);
}

class BB {
  mixin T!(B);
}

int main() {
  AA a = new AA();
  BB b = new BB();
  a.f();
  b.f();

  return 0;
}


-- 



More information about the Digitalmars-d-bugs mailing list