dmd
dmd copied to clipboard
fix 23355: invalid template parameter loses error location in some cases (T[UndefinedIdentifier] has no error loc)
Types (e.g. TypeAArray) don't have a location attached to them, so instead of trying to use that we instead use the error location from the general template parameters.
@maxhaton
The error message came from here: https://github.com/dlang/dmd/blob/58a63ffcedaada9b7501aea60d02a28b12c8770a/compiler/src/dmd/typesem.d#L175 which was called from the here changed file.
Thanks for your pull request, @WebFreak001!
Bugzilla references
| Auto-close | Bugzilla | Severity | Description |
|---|---|---|---|
| ✓ | 23355 | minor | invalid template parameter loses error location in some cases |
Testing this PR locally
If you don't have a local development environment setup, you can use Digger to test this PR:
dub run digger -- build "master + dmd#14465"