erg/compiler/erg_compiler/tests/side_effect.er
Shunsuke Shibayama f9d91aa38e Organize crates
2022-08-13 06:38:12 +09:00

9 lines
329 B
Text

if True, () -> log "hello"
if! True, () => print! "hello"
# if True, () => print! "hello" # this should cause a type error
if True, () ->
_x = "aaa" + input!() # this should cause an effect error
print! "hello" # this should cause an effect error
f x: Int = log x
g x: Int = print! x # this should cause an effect error