"README.md" did not exist on "902650db87f770a83c507a19f63d4e1a86fdad0f"
Fix -Wterm-variable-capture scope (#23434)
-Wterm-variable-capture wasn't accordant with type variable scoping in associated types, in type classes. For example, this code produced the warning: k = 12 class C k a where type AT a :: k -> Type I solved this issue by reusing machinery of newTyVarNameRn function that is accordand with associated types: it does lookup for each free type variable when we are in the type class context. And in this patch I use result of this work to make sure that -Wterm-variable-capture warns only on implicitly quantified type variables.
parent
273ff0c7
No related branches found
No related tags found
Pipeline #79366 canceled
Stage: tool-lint
Stage: quick-build
Stage: full-build
Stage: packaging
Stage: testing
Stage: deploy
Showing
- compiler/GHC/Rename/HsType.hs 62 additions, 9 deletionscompiler/GHC/Rename/HsType.hs
- testsuite/tests/rename/should_compile/T22513a.stderr 4 additions, 3 deletionstestsuite/tests/rename/should_compile/T22513a.stderr
- testsuite/tests/rename/should_compile/T22513b.stderr 2 additions, 1 deletiontestsuite/tests/rename/should_compile/T22513b.stderr
- testsuite/tests/rename/should_compile/T22513c.stderr 2 additions, 1 deletiontestsuite/tests/rename/should_compile/T22513c.stderr
- testsuite/tests/rename/should_compile/T22513d.stderr 3 additions, 2 deletionstestsuite/tests/rename/should_compile/T22513d.stderr
- testsuite/tests/rename/should_compile/T22513e.stderr 3 additions, 2 deletionstestsuite/tests/rename/should_compile/T22513e.stderr
- testsuite/tests/rename/should_compile/T22513f.stderr 3 additions, 2 deletionstestsuite/tests/rename/should_compile/T22513f.stderr
- testsuite/tests/rename/should_compile/T22513g.stderr 3 additions, 2 deletionstestsuite/tests/rename/should_compile/T22513g.stderr
- testsuite/tests/rename/should_compile/T22513h.stderr 3 additions, 2 deletionstestsuite/tests/rename/should_compile/T22513h.stderr
- testsuite/tests/rename/should_compile/T23434.hs 10 additions, 0 deletionstestsuite/tests/rename/should_compile/T23434.hs
- testsuite/tests/rename/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/rename/should_compile/all.T
Loading
-
mentioned in merge request !10548 (closed)
-
mentioned in issue #23434 (closed)
Please register or sign in to comment