summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2011-05-03 14:44:33 +0000
committerMartin Odersky <odersky@gmail.com>2011-05-03 14:44:33 +0000
commit7858ae7be57fe4ad27329c81d376ab17a720a8b5 (patch)
treea9b497ed2eb04f22672e99dede91d355ee9285ef
parent4e96111f35f11ee4138ddbc9e452756fab081884 (diff)
downloadscala-7858ae7be57fe4ad27329c81d376ab17a720a8b5.tar.gz
scala-7858ae7be57fe4ad27329c81d376ab17a720a8b5.tar.bz2
scala-7858ae7be57fe4ad27329c81d376ab17a720a8b5.zip
Closes #4537. No review.
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala7
1 files 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
+ }
}
}