-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2476 from NishantBansal2003/semantic_error_update
fixes semantic error for int (Issue #1926)
- Loading branch information
Showing
5 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from lpython import i32 | ||
|
||
def variable_function(): | ||
x: int = 1 | ||
y: i32 = 2 | ||
print("x + y is", x + y) | ||
|
||
variable_function() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"basename": "asr-test_int_semantic_error-44fe25e", | ||
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}", | ||
"infile": "tests/errors/test_int_semantic_error.py", | ||
"infile_hash": "79ca7d3f440b2538aa0819f910bea5ef24820d245b2179e1bf4cce6d", | ||
"outfile": null, | ||
"outfile_hash": null, | ||
"stdout": null, | ||
"stdout_hash": null, | ||
"stderr": "asr-test_int_semantic_error-44fe25e.stderr", | ||
"stderr_hash": "a1cd1ec0fee194e3c1651668753a1666ca46c925fa91335c6230e026", | ||
"returncode": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
semantic error: int type is not supported yet. | ||
--> tests/errors/test_int_semantic_error.py:4:8 | ||
| | ||
4 | x: int = 1 | ||
| ^^^ Hint: Use i8, i16, i32 or i64 for now. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters