Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct class member access doesn't work #2723

Open
Thirumalai-Shaktivel opened this issue Jun 3, 2024 · 1 comment
Open

Direct class member access doesn't work #2723

Thirumalai-Shaktivel opened this issue Jun 3, 2024 · 1 comment
Labels
asr ASR related changes

Comments

@Thirumalai-Shaktivel
Copy link
Collaborator

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
Copy link
Collaborator Author

Assigned: @tanay-man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asr ASR related changes
Projects
None yet
Development

No branches or pull requests

1 participant