diff options
Diffstat (limited to 'sources/scalac/typechecker')
-rw-r--r-- | sources/scalac/typechecker/Analyzer.java | 16 | ||||
-rw-r--r-- | sources/scalac/typechecker/Infer.java | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/sources/scalac/typechecker/Analyzer.java b/sources/scalac/typechecker/Analyzer.java index 9a9803691f..3c3812c573 100644 --- a/sources/scalac/typechecker/Analyzer.java +++ b/sources/scalac/typechecker/Analyzer.java @@ -129,7 +129,6 @@ public class Analyzer extends Transformer implements Modifiers, Kinds { pickle.add(sym.owner().info().lookup(sym.name.toTermName())); pickle.add(sym.owner().info().lookup(sym.name.toTypeName())); pickle.pickle(); - pickle.writeFile(fullname); global.symdata.put(fullname, pickle); } break; @@ -270,12 +269,6 @@ public class Analyzer extends Transformer implements Modifiers, Kinds { * - symbols with `override' modifier override some other symbol. */ void validate(Symbol sym) { - checkNoConflict(sym, DEFERRED, PRIVATE); - checkNoConflict(sym, FINAL, SEALED); - checkNoConflict(sym, FINAL, PRIVATE); - checkNoConflict(sym, PRIVATE, PROTECTED); - checkNoConflict(sym, PRIVATE, OVERRIDE); - checkNoConflict(sym, DEFERRED, FINAL); if ((sym.flags & ABSTRACTCLASS) != 0 && sym.kind != CLASS) { error(sym.pos, "`abstract' modifier can be used only for classes; " + "\nit should be omitted for abstract members"); @@ -317,6 +310,12 @@ public class Analyzer extends Transformer implements Modifiers, Kinds { sym.flags &= ~OVERRIDE; } } + checkNoConflict(sym, DEFERRED, PRIVATE); + checkNoConflict(sym, FINAL, SEALED); + checkNoConflict(sym, FINAL, PRIVATE); + checkNoConflict(sym, PRIVATE, PROTECTED); + checkNoConflict(sym, PRIVATE, OVERRIDE); + checkNoConflict(sym, DEFERRED, FINAL); } /** Check that @@ -712,8 +711,9 @@ public class Analyzer extends Transformer implements Modifiers, Kinds { tree.pos, name.toTermName(), owner, mods & ACCESSFLAGS | CASE, context.scope); enterInScope(cf); - if (!cf.isInitialized()) + if (!cf.isInitialized() || cf.info().symbol().isModuleClass()) { cf.setInfo(new LazyConstrMethodType(tree)); + } } } return enterSym(tree, clazz); diff --git a/sources/scalac/typechecker/Infer.java b/sources/scalac/typechecker/Infer.java index 6690855ec6..b3a6babae5 100644 --- a/sources/scalac/typechecker/Infer.java +++ b/sources/scalac/typechecker/Infer.java @@ -926,11 +926,13 @@ public class Infer implements Modifiers, Kinds { if (i == alts.length) throw new Type.Error("missing arguments for " + alts[0]); } + /* // then catch the case of a single alternative. if (alts.length == 1) { tree.setSymbol(alts[0]).setType(alttypes[0]); return; } + */ // finally, do the normal case. int best = -1; for (int i = 0; i < alttypes.length; i++) { |