Skip to content

Direct class member access doesn't work #2723

Open
@Thirumalai-Shaktivel

Description

@Thirumalai-Shaktivel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    asrASR related changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions