mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-17 13:27:30 +03:00
23 lines
570 B
Plaintext
23 lines
570 B
Plaintext
|
|
use Foo Foo
|
|
use Optional Some None
|
|
|
|
structural type Foo a b = Foo a (Optional b)
|
|
|
|
foo : Foo a b -> (b -> c) -> Foo a c
|
|
foo x f = match x with
|
|
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 = match x with
|
|
-- 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
|