mirror of
https://github.com/erg-lang/erg.git
synced 2025-12-23 05:36:48 +00:00
6 lines
184 B
Python
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
|