mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Add a uitest for pseudo-polymorphic specializations
This commit is contained in:
parent
19c0ebc10f
commit
32d4b45557
2 changed files with 19 additions and 1 deletions
|
@ -0,0 +1,17 @@
|
|||
app "test" provides [main] to "./platform"
|
||||
|
||||
main =
|
||||
foo : a, Bool -> Str
|
||||
foo = \in, b -> if b then "done" else bar in
|
||||
# ^^^ a -[[bar(2)]]-> Str
|
||||
# ^^^ a, Bool -[[foo(1)]]-> Str
|
||||
|
||||
bar = \_ -> foo {} Bool.true
|
||||
# ^^^ {}, Bool -[[]]-> Str
|
||||
|
||||
foo "" Bool.false
|
||||
# ^^^{inst} Str, Bool -[[foo(1)]]-> Str
|
||||
# │ foo : a, Bool -> Str
|
||||
# │ foo = \in, b -> if b then "done" else bar in
|
||||
# │ ^^^ Str -[[bar(2)]]-> Str
|
||||
# │ ^^^ Str, Bool -[[foo(1)]]-> Str
|
Loading…
Add table
Add a link
Reference in a new issue