From d74bf7900276c97033f7845251ced7a328d8053b Mon Sep 17 00:00:00 2001 From: Akuli Date: Sat, 23 Dec 2023 13:51:44 +0200 Subject: [PATCH] Add test for *array --- 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]