lcompilers / lpython

Python compiler
https://lpython.org/
Other
1.5k stars 158 forks source link

Initial implementation of Inheritance and Polymorphic functions #2801

Closed tanay-man closed 1 month ago

certik commented 1 month ago

Not sure why the kernel is failing:

[doctest] doctest version is "2.4.8"
[doctest] run with "--help" for options
0 0 0 0 0 0 0 0 0 0 
test_lpython: /home/runner/micromamba/envs/lp/include/llvm/IR/DataLayout.h:636: uint64_t llvm::StructLayout::getElementOffset(unsigned int) const: Assertion `Idx < NumElements && "Invalid element idx!"' failed.
===============================================================================
/home/runner/work/lpython/lpython/src/lpython/tests/test_llvm.cpp:1556:
TEST CASE:  PythonCompiler classes

/home/runner/work/lpython/lpython/src/lpython/tests/test_llvm.cpp:1556: FATAL ERROR: test case CRASHED: SIGABRT - Abort (abnormal termination) signal

It looks like it could be caused by this PR.

Thirumalai-Shaktivel commented 1 month ago

I think the kernel failure is not related to this PR.

Edit: It seems related. I will check and report back

tanay-man commented 1 month ago

We have to merge this with https://github.com/lcompilers/lpython/pull/2795 before merging as some of the ASR-pass related modifications are present there.

Thirumalai-Shaktivel commented 1 month ago

Can you please rebase the branch with main?

Thirumalai-Shaktivel commented 1 month ago

Update or rebase this PR and it is good to merge.

Thirumalai-Shaktivel commented 1 month ago

Also, change the PR heading to appropriate description

Thirumalai-Shaktivel commented 1 month ago

Also, let's clean up the commit messages.

Thirumalai-Shaktivel commented 1 month ago

See: https://github.com/lcompilers/lpython/pull/783#issuecomment-1188875210, https://github.com/lcompilers/lpython/pull/319#issuecomment-1101983511

tanay-man commented 1 month ago

Do I have to remove all the commits in the history?

tanay-man commented 1 month ago

@Thirumalai-Shaktivel can you please tell what an appropriate title for this PR would be?

tanay-man commented 1 month ago

fixes #2799, #2797

Thirumalai-Shaktivel commented 1 month ago

Thanks for the changes. I have set this PR to auto-merge