www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14549] New: isVirtualMethod does not work well with Github DMD

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 puremagic.com
          Reporter: puneet 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'

--
May 05 2015