[Issue 14549] New: isVirtualMethod does not work well with Github DMD

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 5 11:19:53 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14549

          Issue ID: 14549
           Summary: isVirtualMethod does not work well with Github DMD
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: puneet at coverify.org

string foo(T)() {
  static if(T.tupleof.length >= 0)
    return "";
}

class frop{
  mixin(foo!(typeof(this)));
  static if(__traits(compiles, undefined)) { }
  else int bar = 0;
  static if(! __traits(isVirtualMethod, this.bar)) {  }
}

$ dmd test.d
test.d(10): Error: no property 'bar' for type 'test.frop'

--


More information about the Digitalmars-d-bugs mailing list