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([1, 2, 3])
a.x.append(4)
print(a.x)
main0()
(lp) lpython$ python examples/expr2.py
[1, 2, 3, 4]
(lp) lpython$ lpython examples/expr2.py
semantic error: Function '' is not declared
--> examples/expr2.py:9:5
|
9 | a.x.append(4)
| ^^^^^^^^^^^^^
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