Open
Description
Example:
(lp) lpython$ cat examples/expr2.py
from lpython import i32, dataclass
@dataclass
class A:
x: list[i32]
def main0():
a: A = A([])
main0()
(lp) lpython$ python examples/expr2.py
(lp) lpython$ lpython examples/expr2.py
semantic error: Type mismatch in procedure call; the types must be compatible
--> examples/expr2.py:8:14
|
8 | a: A = A([])
| ^^ type mismatch (passed argument type is list[A] but required type is list[i32])
|
5 | x: list[i32]
| ^^^^^^^^^^^^ type mismatch (passed argument type is list[A] but required type is list[i32])
Note: if any of the above error or warning messages are not clear or are lacking
context please report it to us (we consider that a bug that must be fixed).
Metadata
Metadata
Assignees
Labels
No labels