Bug 21661 – Can't use fully-qualified name of the current module inside an expression
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-02-24T15:23:23Z
Last change time
2021-02-26T08:47:26Z
Keywords
pull
Assigned to
No Owner
Creator
Boris Carvajal
Comments
Comment #0 by boris2.9 — 2021-02-24T15:23:23Z
Test:
-----
module pkg.pkg2.test;
enum x = 1;
pragma(msg, pkg.pkg2.test.stringof);
pragma(msg, pkg.pkg2.test.x.stringof);
-----
Output:
onlineapp.d(5): Error: undefined identifier pkg2 in package pkg, perhaps add static import pkg.pkg2;
onlineapp.d(5): while evaluating pragma(msg, package pkg.pkg2.test.stringof)
onlineapp.d(6): Error: undefined identifier pkg2 in package pkg, perhaps add static import pkg.pkg2;
onlineapp.d(6): while evaluating pragma(msg, package pkg.pkg2.test.x.stringof)
Program compiles fine when the module declaration is a single identifier.
Comment #1 by dlang-bot — 2021-02-24T15:49:57Z
@BorisCarvajal created dlang/dmd pull request #12230 "Fix Issue 21661 - Can't use fully-qualified name of the current modul…" fixing this issue:
- Fix Issue 21661 - Can't use fully-qualified name of the current module inside an expression
https://github.com/dlang/dmd/pull/12230
Comment #2 by dlang-bot — 2021-02-26T08:47:26Z
dlang/dmd pull request #12230 "Fix Issue 21661 - Can't use fully-qualified name of the current modul…" was merged into master:
- 2f58848f8ce06a19060d01a5032177de51895df2 by Boris Carvajal:
Fix Issue 21661 - Can't use fully-qualified name of the current module inside an expression
https://github.com/dlang/dmd/pull/12230