Skip to content

Commit

Permalink
TEST: Add test for struct with no init_expr
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed May 13, 2023
1 parent 7f7dbde commit abdb697
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/errors/structs_02.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from lpython import i32, dataclass

@dataclass
class S:
x: i32

def main0():
s: S
s.x = 2

main0()
4 changes: 4 additions & 0 deletions tests/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit abdb697

Please sign in to comment.