diff options
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/tools/scalai/Environment.java | 14 | ||||
-rw-r--r-- | sources/scala/tools/scalai/ExpressionCompiler.java | 1 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sources/scala/tools/scalai/Environment.java b/sources/scala/tools/scalai/Environment.java index 3465392320..c307929f1a 100644 --- a/sources/scala/tools/scalai/Environment.java +++ b/sources/scala/tools/scalai/Environment.java @@ -198,12 +198,14 @@ public class Environment { private void loadMethodOverride(Type[] bases, Symbol symbol) { if (!symbol.isMethod()) return; Override override = Override.empty().insert(symbol); - if (symbol.isExternal()) override.insert(mirror.getMethod(symbol)); - for (int i = 0; i < bases.length; i++) { - Symbol overridden = symbol.overriddenSymbol(bases[i], true); - if (overridden == Symbol.NONE) continue; - assert Debug.log("update override: ", symbol, " <- ", overridden); - override.insert(lookupOverride(overridden)); + if (!symbol.isInitializer()) { + if (symbol.isExternal()) override.insert(mirror.getMethod(symbol)); + for (int i = 0; i < bases.length; i++) { + Symbol overridden = symbol.overriddenSymbol(bases[i], true); + if (overridden == Symbol.NONE) continue; + assert Debug.log("update override: ",symbol," <- ",overridden); + override.insert(lookupOverride(overridden)); + } } insertOverride(symbol, override); } diff --git a/sources/scala/tools/scalai/ExpressionCompiler.java b/sources/scala/tools/scalai/ExpressionCompiler.java index 9cdbb483bc..0dee99ba8a 100644 --- a/sources/scala/tools/scalai/ExpressionCompiler.java +++ b/sources/scala/tools/scalai/ExpressionCompiler.java @@ -257,6 +257,7 @@ public class ExpressionCompiler { break; case JavaClass(Class clasz): + if (symbol.isInitializer()) break; throw Debug.abort("!!! illegal super on java class", symbol); default: |