From ca81368be65e18d7a51826f0a1bd3253bcfd305b Mon Sep 17 00:00:00 2001 From: Akuli Date: Sat, 23 Dec 2023 15:04:50 +0200 Subject: [PATCH] Add test for *array (#474) --- tests/wrong_type/deref_array.jou | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests/wrong_type/deref_array.jou diff --git a/tests/wrong_type/deref_array.jou b/tests/wrong_type/deref_array.jou new file mode 100644 index 00000000..545add13 --- /dev/null +++ b/tests/wrong_type/deref_array.jou @@ -0,0 +1,3 @@ +def foo() -> int: + x = [1, 2, 3] + return *x # Error: the dereference operator '*' is only for pointers, not for int[3]