foo : Lazy (() -> ())
foo = \x => the () $ case x of () => ()
bar : Lazy (() -> ())
bar = \x => case x of () => ()
Expected Behavior
Both functions will pass the type check
Observed Behavior
foo successfully passes type checking, but bar doesn't:
Error: While processing right hand side of bar. Can't solve constraint between: () and ?caseTy [no locals in scope].
Test:7:29--7:31
3 | foo : Lazy (() -> ())
4 | foo = \x => the () $ case x of () => ()
5 |
6 | bar : Lazy (() -> ())
7 | bar = \x => case x of () => ()
^^
Steps to Reproduce
Expected Behavior
Both functions will pass the type check
Observed Behavior
foo
successfully passes type checking, butbar
doesn't: