diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-06-06 13:18:09 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-06-08 15:23:06 +0200 |
commit | f0683d82d23cccf372b76528520422a2ac5a266a (patch) | |
tree | bd9a57a5e6368a78b29b1e6a0ba59efcf8ab3d89 /src | |
parent | 1fac5bcbbcb9bbfc5953c29574f3952b97945921 (diff) | |
download | scala-f0683d82d23cccf372b76528520422a2ac5a266a.tar.gz scala-f0683d82d23cccf372b76528520422a2ac5a266a.tar.bz2 scala-f0683d82d23cccf372b76528520422a2ac5a266a.zip |
typers: fixes error handling in checkStable
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index b0f6e44e88..86eb4b678f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -237,7 +237,9 @@ trait Typers extends Modes with Adaptations with Taggings { * @return ... */ def checkStable(tree: Tree): Tree = - if (treeInfo.isExprSafeToInline(tree)) tree else UnstableTreeError(tree) + if (treeInfo.isExprSafeToInline(tree)) tree + else if (tree.isErrorTyped) tree + else UnstableTreeError(tree) /** Would tree be a stable (i.e. a pure expression) if the type * of its symbol was not volatile? |