- rGHC4a931665e41b: Disable `-fdefer-out-of-scope-variables` in ghci.
- Trac Issues
make test TEST="T15259 T14963a T14963b T14963c"
This solves the same problem as D4833, but seems like a more elegant solution, so I suggest we roll with this patch instead of mine.
One request though; it was not obvious to me that GHCi would end up in tcUserStmt, so it would be a good idea IMO to add some hints to ghc/GHCi/UI.hs to this extent. And maybe also amend the comment tcUserStmt (see inline comment).
Maybe amend this comment here with hints at the relevant tickets? GHCi now doesn't just emit redundant warnings if you keep the -defer options on, it actually panics. I think there should be a Note to this extent.