mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 20:14:45 +00:00
Add tests/should_err/callable.er
This commit is contained in:
parent
5a7c586f8b
commit
1fa93bf4bc
2 changed files with 18 additions and 0 deletions
13
tests/should_err/callable.er
Normal file
13
tests/should_err/callable.er
Normal 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
|
|
@ -204,3 +204,8 @@ fn exec_side_effect() -> Result<(), ()> {
|
|||
fn exec_subtyping() -> Result<(), ()> {
|
||||
expect_failure("tests/should_err/subtyping.er", 2)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn exec_callable() -> Result<(), ()> {
|
||||
expect_failure("tests/should_err/callable.er", 4)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue