Bug 21502 – __traits(getUnitTests) returns empty tuple for package modules

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-12-26T12:05:10Z
Last change time
2024-12-13T19:13:38Z
Assigned to
No Owner
Creator
Max Samukha
Moved to GitHub: dmd#18010 →

Comments

Comment #0 by maxsamukha — 2020-12-26T12:05:10Z
a/b/package.d: 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).
Comment #1 by robert.schadek — 2024-12-13T19:13:38Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18010 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB