Skip to content

Commit ad2d806

Browse files
committed
Update reference tests
1 parent 7014ec3 commit ad2d806

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"basename": "asr-const_01-af8289b",
3+
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
4+
"infile": "tests/errors/const_01.py",
5+
"infile_hash": "99815a83c10b756d0f7afa75aa637ed8e4e969f9382b456bfd08df31",
6+
"outfile": null,
7+
"outfile_hash": null,
8+
"stdout": null,
9+
"stdout_hash": null,
10+
"stderr": "asr-const_01-af8289b.stderr",
11+
"stderr_hash": "f47e74e916315ec82f38680f66c9cf5ef3c958bcdfa87b9efe09b264",
12+
"returncode": 2
13+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
semantic error: Constant variable x is not initialised at declaration.
2+
--> tests/errors/const_01.py:4:5
3+
|
4+
4 | x: Const[i32]
5+
| ^^^^^^^^^^^^^
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"basename": "asr-const_02-fce29b7",
3+
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
4+
"infile": "tests/errors/const_02.py",
5+
"infile_hash": "488db60d4763af36319eac3275bb6091a3d71f0dccfb5c1e7155c8fa",
6+
"outfile": null,
7+
"outfile_hash": null,
8+
"stdout": null,
9+
"stdout_hash": null,
10+
"stderr": "asr-const_02-fce29b7.stderr",
11+
"stderr_hash": "b8b90da28518edbe487dbe6f52f1f25f004042fe463e8fba7b96d174",
12+
"returncode": 2
13+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
semantic error: Targets with Const[i32] type cannot be re-assigned.
2+
--> tests/errors/const_02.py:5:5
3+
|
4+
5 | x = 5
5+
| ^

0 commit comments

Comments
 (0)