dmd icon indicating copy to clipboard operation
dmd copied to clipboard

fix 23355: invalid template parameter loses error location in some cases (T[UndefinedIdentifier] has no error loc)

Open WebFreak001 opened this issue 3 years ago • 1 comments

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.

WebFreak001 avatar Sep 21 '22 21:09 WebFreak001

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"

dlang-bot avatar Sep 21 '22 21:09 dlang-bot