Skip to content

Commit f3c8a46

Browse files
committed
tmp
1 parent 3782c37 commit f3c8a46

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

integration_tests/aaaa1.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from tmp_pkg import A, hi
2+
3+
def main():
4+
hi()
5+
a: A
6+
7+
main()

integration_tests/tmp_pkg/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .tmp import A, hi

integration_tests/tmp_pkg/tmp.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@dataclass
2+
class A:
3+
x: i32
4+
5+
def hi():
6+
print("hi")

src/lpython/semantics/python_ast_to_asr.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#include <lpython/semantics/python_comptime_eval.h>
3232
#include <lpython/semantics/python_attribute_eval.h>
3333
#include <lpython/semantics/python_intrinsic_eval.h>
34+
#include <lpython/pickle.h>
35+
3436
#include <lpython/parser/parser.h>
3537
#include <libasr/serialization.h>
3638

@@ -6696,6 +6698,8 @@ Result<ASR::TranslationUnit_t*> python_ast_to_asr(Allocator &al, LocationManager
66966698
#if defined(WITH_LFORTRAN_ASSERT)
66976699
diag::Diagnostics diagnostics;
66986700
if (!asr_verify(*tu, true, diagnostics)) {
6701+
6702+
std::cerr << LCompilers::LPython::pickle(*tu, true, true, false) << std::endl;
66996703
std::cerr << diagnostics.render2();
67006704
throw LCompilersException("Verify failed");
67016705
};

0 commit comments

Comments
 (0)