We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1b378a commit 304107fCopy full SHA for 304107f
integration_tests/CMakeLists.txt
@@ -578,6 +578,7 @@ RUN(NAME structs_24 LABELS cpython llvm c)
578
RUN(NAME structs_25 LABELS cpython llvm c)
579
RUN(NAME structs_26 LABELS cpython llvm c)
580
RUN(NAME structs_27 LABELS cpython llvm c)
581
+RUN(NAME structs_28 LABELS cpython llvm c)
582
583
RUN(NAME symbolics_01 LABELS cpython_sym c_sym)
584
RUN(NAME symbolics_02 LABELS cpython_sym c_sym)
integration_tests/structs_28.py
@@ -0,0 +1,15 @@
1
+from lpython import dataclass, i32
2
+
3
+@dataclass
4
+class Pattern:
5
+ _foo : str
6
+ pass
7
+ _n: i32
8
9
+def main0():
10
+ p: Pattern = Pattern("some string", 5)
11
+ assert p._foo == "some string"
12
+ assert p._n == 5
13
+ print(p)
14
15
+main0()
0 commit comments