unison/unison-src/tests/ungeneralize-bug.uu
2018-10-02 13:53:45 -04:00

23 lines
553 B
Plaintext

use Foo Foo
use Optional Some None
type Foo a b = Foo a (Optional b)
foo : Foo a b -> (b -> c) -> Foo a c
foo x f = case x of
Foo a None -> Foo a None
--
-- 🌻 /Users/pchiusano/work/unison/unison-src/tests/typechecker-bug.u has changed, reloading...
-- I found a value of type b where I expected to find one of type c:
--
-- 7 | foo : Foo a b -> (b -> c) -> Foo a c
-- 8 | foo x f = case x of
-- 9 | Foo a None -> Foo a None
--
-- from right here:
--
-- 7 | foo : Foo a b -> (b -> c) -> Foo a c
-- shouldn't be a type error