Skip to content

Commit

Permalink
update tes
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed Jan 10, 2025
1 parent 51531ae commit 892740d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/wrong_type/array_mixed_types_ptr.jou
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
def foo() -> None:
# When we make an array of int* and void*:
# - we could cast int* to void*, and get an array of void*
# - we could cast void* to int*, and get an array of int*
#
# Because the compiler cannot be sure what you want, it refuses to
# guess and instead errors.
a = 1
x = [&a, &a as void*] # Error: array items have different types (int*, void*)
x = [&a, "hello"] # Error: array items have different types (int*, byte*)

0 comments on commit 892740d

Please sign in to comment.