Skip to content

Commit df48a44

Browse files
committed
TEST: Add test for func param redeclaration
1 parent 22b408e commit df48a44

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tests/errors/func_06.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def init_X(m:i32, n: i32, b: CPtr, m: i32) -> None:
2+
B: Pointer[i16[m*n]] = c_p_pointer(b, i16[m*n])
3+
i: i32
4+
j: i32
5+
for i in range(m):
6+
for j in range(n):
7+
B[i * n + j] = i16((i + j) % m)

tests/tests.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,10 @@ asr = true
10981098
filename = "errors/func_05.py"
10991099
asr = true
11001100

1101+
[[test]]
1102+
filename = "errors/func_06.py"
1103+
asr = true
1104+
11011105
# tests/runtime_errors
11021106
[[test]]
11031107
filename = "runtime_errors/test_list_01.py"

0 commit comments

Comments
 (0)