diff options
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/tools/scalac/typechecker/Analyzer.scala | 6 | ||||
-rw-r--r-- | sources/scala/tools/scalac/typechecker/Infer.scala | 2 | ||||
-rw-r--r-- | sources/scalac/symtab/Symbol.java | 4 |
3 files changed, 4 insertions, 8 deletions
diff --git a/sources/scala/tools/scalac/typechecker/Analyzer.scala b/sources/scala/tools/scalac/typechecker/Analyzer.scala index 203e7aa7f0..97a15b50c8 100644 --- a/sources/scala/tools/scalac/typechecker/Analyzer.scala +++ b/sources/scala/tools/scalac/typechecker/Analyzer.scala @@ -274,7 +274,7 @@ class Analyzer(global: scalac_Global, descr: AnalyzerPhase) extends Transformer( } if ((sym.flags & DEF) != 0 && sym.owner().isPrimaryConstructor() && (sym.owner().constructorClass().flags & CASE) != 0) { - error(sym.pos, "`def' modifier not allowed for case class parameters"); + error(sym.pos, "pass-by-name arguments not allowed for case class parameters"); } /*!!! if ((sym.flags & REPEATED) != 0 && sym.owner().isPrimaryConstructor()) { @@ -292,7 +292,7 @@ class Analyzer(global: scalac_Global, descr: AnalyzerPhase) extends Transformer( } checkNoConflict(sym, DEFERRED, PRIVATE); checkNoConflict(sym, FINAL, SEALED); - checkNoConflict(sym, FINAL, PRIVATE); + if ((sym.flags & MODUL) == 0) checkNoConflict(sym, FINAL, PRIVATE); checkNoConflict(sym, PRIVATE, PROTECTED); checkNoConflict(sym, PRIVATE, OVERRIDE); checkNoConflict(sym, DEFERRED, FINAL); @@ -379,7 +379,7 @@ class Analyzer(global: scalac_Global, descr: AnalyzerPhase) extends Transformer( case Type$MethodType(params, restype) => var i = 0; while (i < params.length) { if ((params(i).flags & DEF) != 0) - error(pos, "method with `def' parameters needs to be fully applied"); + error(pos, "method with pass-by-name parameters needs to be fully applied"); if ((params(i).flags & REPEATED) != 0) error(pos, "method with `*' parameters needs to be fully applied"); i = i + 1 diff --git a/sources/scala/tools/scalac/typechecker/Infer.scala b/sources/scala/tools/scalac/typechecker/Infer.scala index ab18187594..0fd2ba0f65 100644 --- a/sources/scala/tools/scalac/typechecker/Infer.scala +++ b/sources/scala/tools/scalac/typechecker/Infer.scala @@ -1278,7 +1278,7 @@ class Infer(global: scalac_Global, gen: TreeGen, make: TreeFactory) extends scal }} if (best >= 0) { { var i = 0; while (i < alttypes.length) { - if (isCompatible(alttypes(i), pt) && best != i && !improves(alttypes(best), alttypes(i))) { + if (isCompatible(alttypes(i), pt) && best != i && !improves(alttypes(best), alttypes(i)) && pt != Type.ErrorType) { throw new Type$Error( overloadResolveErrorMsg( alts(best), alttypes(best), alts(i), alttypes(i)) + diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java index 63206f4044..02ecd876e7 100644 --- a/sources/scalac/symtab/Symbol.java +++ b/sources/scalac/symtab/Symbol.java @@ -834,10 +834,6 @@ public abstract class Symbol implements Modifiers, Kinds { // Symbol names ---------------------------------------------------------------- - /** Get the fully qualified name of this Symbol - * (this is always a normal name, never a type name) - */ - /** Get the simple name of this Symbol (this is always a term name) */ public Name simpleName() { |