Skip to content

Term variable capture (#23740)

Vladislav Zavialov requested to merge wip/int-index/term-capture into master

See #23740 (closed) for context.

Overview:

  1. Main change: Demotion of unqualified variable names in lookupTypeOccRn. See the new Note [Demotion of unqualified variables].
  2. Update notFound and tcTyVar to report TermVariablePE errors.
  3. Extend filterInScopeM to look up in the global rdr env. Use it filterInScopeM (or its new sibling filterInScopeNonClassM) in two new places.
  4. Update error message for TcRnCapturedTermName.

The test cases T23740{a,b,c,d,e,f,g,h,i} mirror the corresponding T22513* cases.

Edited by Vladislav Zavialov

Merge request reports