diff options
author | Martin Odersky <odersky@gmail.com> | 2009-05-26 14:19:52 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-05-26 14:19:52 +0000 |
commit | d73a2965746b3cc0bdeb3f96fed342143deae210 (patch) | |
tree | e654bb6a634acf932cecf5e1f55040a68edaf0cd /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | 0b8ece795b13f651c42b5c01936bebb4312efe5f (diff) | |
download | scala-d73a2965746b3cc0bdeb3f96fed342143deae210.tar.gz scala-d73a2965746b3cc0bdeb3f96fed342143deae210.tar.bz2 scala-d73a2965746b3cc0bdeb3f96fed342143deae210.zip |
added Synthetic Positions; refactored interacti...
added Synthetic Positions; refactored interactive.Global
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 7dc60b91dc..89e2028ded 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -3412,10 +3412,15 @@ trait Typers { self: Analyzer => newTyper(context.makeNewScope(tree, context.owner)).typedExistentialTypeTree(etpt, mode) case TypeTree() => - // we should get here only when something before failed - // and we try again (@see tryTypedApply). In that case we can assign - // whatever type to tree; we just have to survive until a real error message is issued. - tree setType AnyClass.tpe + tree.pos match { + case SyntheticPosition(original) => + tree setType typedType(original, mode).tpe + case _ => + // we should get here only when something before failed + // and we try again (@see tryTypedApply). In that case we can assign + // whatever type to tree; we just have to survive until a real error message is issued. + tree setType AnyClass.tpe + } case _ => throw new Error("unexpected tree: " + tree.getClass + "\n" + tree)//debug } |