1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00
anselme/test/tests/function type dispatch with default.ans

26 lines
294 B
Text

:$ fn(x::is number)
|x
:$ fn(a::is string="o")
|a
fn("s")
fn(5)
fn()
:$ g(n="s", a::is number=5)
return("gn")
:$ g(n="s", a::is string="lol")
return("gs")
|{g(n="k", a="l")}
|{g(n="k", a=1)}
|{g(n="k", "l")}
|{g(n="k", 1)}
|{g("k", "l")}
|{g("k", 1)}
|{g("k", a="l")}
|{g("k", a=1)}