From 7858ae7be57fe4ad27329c81d376ab17a720a8b5 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 3 May 2011 14:44:33 +0000 Subject: Closes #4537. No review. --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 8e49626df6..b35a23ed50 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -943,7 +943,7 @@ trait Typers extends Modes { // // val x: T forSome { ts } = expr // - // would typechek. Or one can simply leave out the type of the `val': + // would typecheck. Or one can simply leave out the type of the `val': // // val x = expr context.unit.warning(tree.pos, "recovering from existential Skolem type error in tree \n"+tree+"\nwith type "+tree.tpe+"\n expected type = "+pt+"\n context = "+context.tree) @@ -3776,7 +3776,10 @@ trait Typers extends Modes { // atPos necessary because qualifier might come from startContext val (tree2, pre2) = makeAccessible(tree1, defSym, pre, qual) // assert(pre.typeArgs isEmpty) // no need to add #2416-style check here, right? - stabilize(tree2, pre2, mode, pt) + stabilize(tree2, pre2, mode, pt) match { + case accErr: Inferencer#AccessError => accErr.emit() + case result => result + } } } -- cgit v1.2.3