www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17694] New: traits compiles fails for property of property


          Issue ID: 17694
           Summary: traits compiles fails for property of property
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: andre s-e-a-p.de

While the first assertion works, the second assertion fails.
I expect it should work, as the statement "typeof(TButton.Margins.Left) l;"
works fine

class TButton
     property TBounds Margins() { return null; }

class TBounds
     property float Left() { return 0.0; }

void main()
  mixin(`static assert(__traits(compiles, TButton.Margins));`); // OK
  mixin(`static assert(__traits(compiles, TButton.Margins.Left));`); // FAILS

Jul 26 2017