[Issue 23528] New: moduleName/fullyQualifiedName no longer works in -betterC

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 1 00:04:20 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=23528

          Issue ID: 23528
           Summary: moduleName/fullyQualifiedName no longer works in
                    -betterC
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: alphaglosined at gmail.com

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

--


More information about the Digitalmars-d-bugs mailing list