Skip to content

Commit

Permalink
Fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Victorious3 committed Mar 4, 2024
1 parent fe329dc commit 5827f72
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test_compiler.pr
Original file line number Diff line number Diff line change
Expand Up @@ -896,14 +896,14 @@ def #test test_array_inference {

def #test test_array_inference_fail {
let str = """
let a: [?; float] = [1, 2, 3, 4]
let a: [?; int] = [1, 2.0, 3, 4]
"""
assert compile(str) == null
assert env.err() == strip_margin("
|main@2:13
| let a: [?; float] = [1, 2, 3, 4]
| ^~~~~~~~~~~~~
|Incompatible types [4; int] and [?; float]\n")
|main@2:31
| let a: [?; int] = [1, 2.0, 3, 4]
| ^~~
|Incompatible types, got double and expected int\n")
}

def #test test_array_size_and_value {
Expand Down

0 comments on commit 5827f72

Please sign in to comment.