Skip to content

Commit 9968fe2

Browse files
add some error cases
1 parent 9b44bc6 commit 9968fe2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/compiler/call-rest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"asc_flags": [
3+
],
4+
"stderr": [
5+
"TS2322: Type '~lib/string/String' is not assignable to type 'i32'."
36
]
47
}

tests/compiler/call-rest.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ assert(count<i32>(1, 2, 3) == 3);
5252

5353
// inferred generic test
5454
assert(count('a','b','c') == 3);
55+
56+
// error cases
57+
count<i32>("a", "b"); // expect a type mismatch error on each argument
58+
count(1, "a"); // expect a type mismatch error on the second argument

0 commit comments

Comments
 (0)