File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
from lpython import i32
2
2
3
3
def f (l : list [i32 ]):
4
- l [ 5 ] = 5
4
+ l . append ( 5 )
Original file line number Diff line number Diff line change 2
2
"basename" : " asr-func_04-eef2656" ,
3
3
"cmd" : " lpython --show-asr --no-color {infile} -o {outfile}" ,
4
4
"infile" : " tests/errors/func_04.py" ,
5
- "infile_hash" : " 763216ad3cb1090dc322e63706d4f92be4e806b1fc2df6f160d02fd0 " ,
5
+ "infile_hash" : " f8a6eed44ebd1dee435e6db842a874c41b8ba2b13d88d16944a4d265 " ,
6
6
"outfile" : null ,
7
7
"outfile_hash" : null ,
8
8
"stdout" : null ,
9
9
"stdout_hash" : null ,
10
10
"stderr" : " asr-func_04-eef2656.stderr" ,
11
- "stderr_hash" : " c0ef482d68b30b03615927ecd02a30b14ff4d24b5673b7399671ee79 " ,
11
+ "stderr_hash" : " d1e5bb4b5356e57124ff34eea9e5b96ecc44d3bc8a1da4b0a7db5b4a " ,
12
12
"returncode" : 2
13
13
}
Original file line number Diff line number Diff line change 1
- semantic error: Assignment to an input function parameter `l` is not allowed
1
+ semantic error: Modifying input function parameter `l` is not allowed
2
2
--> tests/errors/func_04.py:4:5
3
3
|
4
- 4 | l[5] = 5
5
- | ^
4
+ 4 | l.append(5)
5
+ | ^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments