mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-07 21:25:31 +00:00
14 lines
417 B
Python
14 lines
417 B
Python
if True, () -> log "hello"
|
|
if! True, () => print! "hello"
|
|
# if True, () => print! "hello" # this should cause a type error
|
|
if True, do:
|
|
_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
|
|
|
|
echo = print! # this should be an effect error
|
|
_echo = # this is OK
|
|
print! 1
|
|
log
|