erg/tests/should_err/default_param.er
2024-04-24 15:24:05 +09:00

6 lines
184 B
Python

f x: Int, y: Int := 1, z: Nat := 2 = x + y + z
_: (Int, Str) -> Int = f # ERR
_: (Int, Int, Int) -> Int = f # ERR (contravariant)
id_or_int x := 1 = x
_: Int -> Str = id_or_int # ERR