diff options
author | Martin Odersky <odersky@gmail.com> | 2010-04-27 19:18:36 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-04-27 19:18:36 +0000 |
commit | 1f7165c5d4b949078432af79fe4ea1e09b7d77da (patch) | |
tree | b214bee2ad5a4064460f69c4f4f8dc7e8dc85e63 /src/compiler | |
parent | 4a785c87272e07f34782a3d05092884472a15b63 (diff) | |
download | scala-1f7165c5d4b949078432af79fe4ea1e09b7d77da.tar.gz scala-1f7165c5d4b949078432af79fe4ea1e09b7d77da.tar.bz2 scala-1f7165c5d4b949078432af79fe4ea1e09b7d77da.zip |
Closes #3362. Review by dragos.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala index 6f5175c0ea..8a7f4b0958 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala @@ -54,7 +54,11 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT private def checkPackedConforms(tree: Tree, pt: Type): Tree = { if (tree.tpe exists (_.typeSymbol.isExistentialSkolem)) { val packed = localTyper.packedType(tree, NoSymbol) - if (!(packed <:< pt)) localTyper.infer.typeError(tree.pos, packed, pt) + if (!(packed <:< pt)) { + val errorContext = localTyper.context.make(localTyper.context.tree) + errorContext.reportGeneralErrors = true + analyzer.newTyper(errorContext).infer.typeError(tree.pos, packed, pt) + } } tree } |