Skip to content

Commit abdb697

Browse files
committed
TEST: Add test for struct with no init_expr
1 parent 7f7dbde commit abdb697

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/errors/structs_02.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from lpython import i32, dataclass
2+
3+
@dataclass
4+
class S:
5+
x: i32
6+
7+
def main0():
8+
s: S
9+
s.x = 2
10+
11+
main0()

tests/tests.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,10 @@ asr = true
638638
filename = "errors/structs_01.py"
639639
asr = true
640640

641+
[[test]]
642+
filename = "errors/structs_02.py"
643+
asr = true
644+
641645
[[test]]
642646
filename = "errors/const_01.py"
643647
asr = true

0 commit comments

Comments
 (0)