Add tests/should_err/callable.er

This commit is contained in:
Shunsuke Shibayama 2022-12-19 09:14:37 +09:00
parent 5a7c586f8b
commit 1fa93bf4bc
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,13 @@
print! 1 2 # ERR
f = 1
print! f 2 # ERR
f2 x: Int = x
print! f2(1) 2 # ERR
f3 x = x
print! f3(1) 2 # ERR
f4 x = (y) => x
print! f4(1) 2 # OK

View file

@ -204,3 +204,8 @@ fn exec_side_effect() -> Result<(), ()> {
fn exec_subtyping() -> Result<(), ()> { fn exec_subtyping() -> Result<(), ()> {
expect_failure("tests/should_err/subtyping.er", 2) expect_failure("tests/should_err/subtyping.er", 2)
} }
#[test]
fn exec_callable() -> Result<(), ()> {
expect_failure("tests/should_err/callable.er", 4)
}