summaryrefslogtreecommitdiff
path: root/sources/scala/tools/nsc/typechecker/Contexts.scala
diff options
context:
space:
mode:
Diffstat (limited to 'sources/scala/tools/nsc/typechecker/Contexts.scala')
-rwxr-xr-xsources/scala/tools/nsc/typechecker/Contexts.scala26
1 files changed, 13 insertions, 13 deletions
diff --git a/sources/scala/tools/nsc/typechecker/Contexts.scala b/sources/scala/tools/nsc/typechecker/Contexts.scala
index 3130252f74..021e810a43 100755
--- a/sources/scala/tools/nsc/typechecker/Contexts.scala
+++ b/sources/scala/tools/nsc/typechecker/Contexts.scala
@@ -170,10 +170,10 @@ import scala.tools.nsc.util.Position;
def ambiguousError(pos: int, pre: Type, sym1: Symbol, sym2: Symbol, rest: String): unit = {
val msg =
- "ambiguous reference to overloaded definition,\n" +
- "both " + sym1 + sym1.locationString + " of type " + pre.memberType(sym1) +
- "\nand " + sym2 + sym2.locationString + " of type " + pre.memberType(sym2) +
- "\nmatch " + rest;
+ ("ambiguous reference to overloaded definition,\n" +
+ "both " + sym1 + sym1.locationString + " of type " + pre.memberType(sym1) +
+ "\nand " + sym2 + sym2.locationString + " of type " + pre.memberType(sym2) +
+ "\nmatch " + rest);
if (reportAmbiguousErrors) unit.error(pos, msg)
else throw new TypeError(msg);
}
@@ -221,15 +221,15 @@ import scala.tools.nsc.util.Position;
c != NoContext;
}
- pre == NoPrefix
- ||
- (!sym.hasFlag(PRIVATE | PROTECTED))
- ||
- accessWithin(sym.owner) && (!sym.hasFlag(LOCAL) || pre =:= sym.owner.thisType)
- ||
- (!sym.hasFlag(PRIVATE) &&
- (superAccess ||
- (pre.widen.symbol.isSubClass(sym.owner) && isSubClassOfEnclosing(pre.widen.symbol))))
+ (pre == NoPrefix
+ ||
+ (!sym.hasFlag(PRIVATE | PROTECTED))
+ ||
+ accessWithin(sym.owner) && (!sym.hasFlag(LOCAL) || pre =:= sym.owner.thisType)
+ ||
+ (!sym.hasFlag(PRIVATE) &&
+ (superAccess ||
+ (pre.widen.symbol.isSubClass(sym.owner) && isSubClassOfEnclosing(pre.widen.symbol)))))
}
def pushTypeBounds(sym: Symbol): unit = {