You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(base) tanay@tanay-man:~/lcompilers/lpython$ lpython integration_tests/class_05.py
semantic error: Type mismatch in procedure call; the types must be compatible
--> integration_tests/class_05.py:21:11
|
21 | check(d)
| ^ type mismatch (passed argument type is struct Derived but required type is struct Base)
|
15 | def check(x: Base):
| ^^^^ type mismatch (passed argument type is struct Derived but required type is struct Base)
Activity
certik commentedon Aug 11, 2024
I think the subclass has to be automatically cast to the base class in this case.
Thirumalai-Shaktivel commentedon Aug 13, 2024
Let's represent the Cast node in the ASR
will become:
Using the Base name, get the Base type in the asr to llvm backend.
tanay-man commentedon Aug 15, 2024
@Thirumalai-Shaktivel I have implemented the ASR level cast node for this. How to get the cast working in the llvm backend?
Current op-