Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
6406 commits behind the upstream repository.
Krzysztof Gogolewski's avatar
Krzysztof Gogolewski authored
In this correct program

f :: a %1 -> a
f x = case x of x { _DEFAULT -> x }

after checking the alternative we weren't popping the case binder 'x'
from the usage environment, which meant that the lambda-bound 'x'
was counted twice: in the scrutinee and (incorrectly) in the alternative.
In fact, we weren't checking the usage of 'x' at all.
Now the code for handling _DEFAULT is similar to the one handling
data constructors.

Fixes #23025.
8539764b
History
Name Last commit Last update
..
should_compile
should_fail
should_run
Makefile