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.
@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
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