summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T15433a.hs
Commit message (Collapse)AuthorAgeFilesLines
* Error on anon wildcards in tcAnonWildCardOccsheaf2022-02-261-0/+7
The code in tcAnonWildCardOcc assumed that it could never encounter anonymous wildcards in illegal positions, because the renamer would have ruled them out. However, it's possible to sneak past the checks in the renamer by using Template Haskell. It isn't possible to simply pass on additional information when renaming Template Haskell brackets, because we don't know in advance in what context the bracket will be spliced in (see test case T15433b). So we accept that we might encounter these bogus wildcards in the typechecker and throw the appropriate error. This patch also migrates the error messages for illegal wildcards in types to use the diagnostic infrastructure. Fixes #15433