Permalink
Browse files

typers: fixes error handling in checkStable

  • Loading branch information...
xeno-by committed Jun 6, 2012
1 parent 1fac5bc commit f0683d82d23cccf372b76528520422a2ac5a266a
Showing with 3 additions and 1 deletion.
  1. +3 −1 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?

0 comments on commit f0683d8

Please sign in to comment.