diff --git a/tests/errors/structs_02.py b/tests/errors/structs_02.py new file mode 100644 index 0000000000..5c0c1010a0 --- /dev/null +++ b/tests/errors/structs_02.py @@ -0,0 +1,11 @@ +from lpython import i32, dataclass + +@dataclass +class S: + x: i32 + +def main0(): + s: S + s.x = 2 + +main0() diff --git a/tests/tests.toml b/tests/tests.toml index 71d61d9eb1..21790026c9 100644 --- a/tests/tests.toml +++ b/tests/tests.toml @@ -638,6 +638,10 @@ asr = true filename = "errors/structs_01.py" asr = true +[[test]] +filename = "errors/structs_02.py" +asr = true + [[test]] filename = "errors/const_01.py" asr = true