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