ZenCodeLang / ZenCode

The ZenCode project.
MIT License
12 stars 8 forks source link

Polymorphism: Calls to supertype #3

Open kindlich opened 3 years ago

kindlich commented 3 years ago

Currently, compiling the ParsedExpressionSuper will return a PartialTypeExpression of the super type. Therefore the compiler will search for static members on the super type, which is incorrect.

Also, we will most likely need a separate expression for super type calls, since inside the Java Bytecode module we need to use another opcode instruction (invokeSpecial instead of invokeVirtual/interface to make sure that this specific implementation is called)

kindlich commented 3 months ago

We'll check if this was already addressed in the refactor or not. If not, we'll leave it open and push this after the refactor, if already fixed or fixable without too much effort, we'll close this during the refactor.