Skip to content

Commit 3a6d92b

Browse files
authored
Merge pull request #1853 from Shaikh-Ubaid/update_test
TEST: Update test to test input param modification
2 parents e920140 + 1b0524c commit 3a6d92b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/errors/func_04.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from lpython import i32
22

33
def f(l: list[i32]):
4-
l[5] = 5
4+
l.append(5)

tests/reference/asr-func_04-eef2656.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"basename": "asr-func_04-eef2656",
33
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
44
"infile": "tests/errors/func_04.py",
5-
"infile_hash": "763216ad3cb1090dc322e63706d4f92be4e806b1fc2df6f160d02fd0",
5+
"infile_hash": "f8a6eed44ebd1dee435e6db842a874c41b8ba2b13d88d16944a4d265",
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": null,
99
"stdout_hash": null,
1010
"stderr": "asr-func_04-eef2656.stderr",
11-
"stderr_hash": "c0ef482d68b30b03615927ecd02a30b14ff4d24b5673b7399671ee79",
11+
"stderr_hash": "d1e5bb4b5356e57124ff34eea9e5b96ecc44d3bc8a1da4b0a7db5b4a",
1212
"returncode": 2
1313
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
semantic error: Assignment to an input function parameter `l` is not allowed
1+
semantic error: Modifying input function parameter `l` is not allowed
22
--> tests/errors/func_04.py:4:5
33
|
4-
4 | l[5] = 5
5-
| ^
4+
4 | l.append(5)
5+
| ^^^^^^^^^^^

0 commit comments

Comments
 (0)