lpython icon indicating copy to clipboard operation
lpython copied to clipboard

Direct class member access doesn't work

Open Thirumalai-Shaktivel opened this issue 1 year ago • 1 comments

MRE:

from lpython import i32

class test:
    x: i32 = 4

print(test.x)

Error:

$ lpython examples/expr2.py
ASR verify pass error: Var_t::m_v test does not point to a Variable_t, Function_t, or EnumType_t (possibly behind ExternalSymbol_t)
Internal Compiler Error: Unhandled exception
Traceback (most recent call last):
  File "/Users/thirumalai/Open_Source/lpython/src/bin/lpython.cpp", line 2170
    err = compile_python_using_llvm(arg_file, tmp_o, runtime_library_dir,
  File "/Users/thirumalai/Open_Source/lpython/src/bin/lpython.cpp", line 1010
    r1 = LCompilers::LPython::python_ast_to_asr(al, lm, nullptr, *ast, diagnostics, compiler_options,
  File "/Users/thirumalai/Open_Source/lpython/src/lpython/semantics/python_ast_to_asr.cpp", line 8432
    throw LCompilersException("Verify failed");
LCompilersException: Verify failed

Thirumalai-Shaktivel avatar Jun 03 '24 14:06 Thirumalai-Shaktivel

Assigned: @tanay-man

Thirumalai-Shaktivel avatar Jun 03 '24 14:06 Thirumalai-Shaktivel