Bug 23528 – moduleName/fullyQualifiedName no longer works in -betterC

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-12-01T00:04:20Z
Last change time
2024-12-13T19:26:11Z
Keywords
betterC
Assigned to
No Owner
Creator
Richard (Rikki) Andrew Cattermole
See also
https://issues.dlang.org/show_bug.cgi?id=16495
Moved to GitHub: dmd#20199 →

Comments

Comment #0 by alphaglosined — 2022-12-01T00:04:20Z
Regression in dmd 2.101.0. Example: ```d struct Foo { } import std.traits; pragma(msg, fullyQualifiedName!Foo); ``` Also applies to moduleName. Error message: ``` /dlang/dmd/linux/bin64/../../src/phobos/std/traits.d(654): Error: none of the overloads of template `std.algorithm.searching.skipOver` are callable using argument types `!()(string, string)` /dlang/dmd/linux/bin64/../../src/phobos/std/algorithm/searching.d(4239): Candidate is: `skipOver(alias pred = (a, b) => a == b)` /dlang/dmd/linux/bin64/../../src/phobos/std/traits.d(654): Error: none of the overloads of template `std.algorithm.searching.skipOver` are callable using argument types `!()(string, string)` /dlang/dmd/linux/bin64/../../src/phobos/std/algorithm/searching.d(4239): Candidate is: `skipOver(alias pred = (a, b) => a == b)` /dlang/dmd/linux/bin64/../../src/phobos/std/traits.d(656): Error: none of the overloads of template `std.algorithm.searching.findSplit` are callable using argument types `!()(string, string)` /dlang/dmd/linux/bin64/../../src/phobos/std/algorithm/searching.d(2899): Candidate is: `findSplit(alias pred = "a == b", R1, R2)(R1 haystack, R2 needle)` with `pred = "a == b", R1 = string, R2 = string` must satisfy the following constraint: ` isForwardRange!R1` /dlang/dmd/linux/bin64/../../src/phobos/std/traits.d(646): Error: template instance `std.traits.fqnSym!(onlineapp)` error instantiating /dlang/dmd/linux/bin64/../../src/phobos/std/traits.d(842): instantiated from here: `fqnSym!(Foo)` /dlang/dmd/linux/bin64/../../src/phobos/std/traits.d(565): instantiated from here: `fqnType!(Foo, false, false, false, false)` onlineapp.d(5): instantiated from here: `fullyQualifiedName!(Foo)` onlineapp.d(5): while evaluating `pragma(msg, fullyQualifiedName!(Foo))` ```
Comment #1 by razvan.nitu1305 — 2022-12-01T11:40:04Z
Are you sure this is a regression? What was the last version that accepted this code? Might be a phobos issue also.
Comment #2 by razvan.nitu1305 — 2022-12-01T11:49:44Z
(In reply to RazvanN from comment #1) > Are you sure this is a regression? What was the last version that accepted > this code? Might be a phobos issue also. I have tested with 2.100.2 and 2.100.1 and it still fails.
Comment #3 by alphaglosined — 2022-12-01T19:25:28Z
You're right I must be forgetting some issues I had in the past. Swapping to enhancement instead since something so basic should work (probably shouldn't be in library at all given how many templates it uses).
Comment #4 by bugzilla — 2023-01-15T08:03:55Z
Comment #5 by robert.schadek — 2024-12-13T19:26:11Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20199 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB