-
Notifications
You must be signed in to change notification settings - Fork 173
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
This:
def check_re_range_alternatives(
alts : list[ReRange],
char : str) -> bool:
result : bool = False
rr : ReRange
for rr in alts:
if check_re_range(rr, char):
result = True
break
return resultgives:
$ lpython a.py
semantic error: Unsupported type annotation: ReRange
--> a.py:2:21
|
2 | alts : list[ReRange],
| ^^^^^^^ But rather the error message should be:
semantic error: The type `ReRange` is not declared
or
semantic error: Unknown type `ReRange`
I think I like the second more.
Regarding "Unsupported type annotation: ReRange", that should be emitted for things like from typing import List. If you just do List[i32] without importing it from anywhere, then I think it should just say Unknown type List, and we can provide a "hint: did you mean list?"
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers