www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21502] New: __traits(getUnitTests) returns empty tuple for


          Issue ID: 21502
           Summary: __traits(getUnitTests) returns empty tuple for package
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: maxsamukha gmail.com


module a.b;

unittest {}

static assert(__traits(getUnitTests, a.b).length == 1);

dmd -unittest a/b/package.d
a/b/package.d(7): Error: static assert:  0LU == 1LU is false

Passes if package.d is moved to the first level (a/package.d).

Dec 26 2020