Permalink
Browse files

remove unused methods: checkStable, isStableExceptVolatile

  • Loading branch information...
1 parent fada1ef commit 9a4361178f87d4540169422a1f9462aa2b539cb5 @adriaanm adriaanm committed May 16, 2013
Showing with 0 additions and 23 deletions.
  1. +0 −23 src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -250,29 +250,6 @@ trait Typers extends Adaptations with Tags {
case _ => tp
}
- /** Check that `tree` is a stable expression.
- */
- def checkStable(tree: Tree): 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?
- */
- protected def isStableExceptVolatile(tree: Tree) = {
- tree.hasSymbolField && tree.symbol != NoSymbol && tree.tpe.isVolatile &&
- { val savedTpe = tree.symbol.info
- val savedSTABLE = tree.symbol getFlag STABLE
- tree.symbol setInfo AnyRefClass.tpe
- tree.symbol setFlag STABLE
- val result = treeInfo.isExprSafeToInline(tree)
- tree.symbol setInfo savedTpe
- tree.symbol setFlag savedSTABLE
- result
- }
- }
private def errorNotClass(tpt: Tree, found: Type) = { ClassTypeRequiredError(tpt, found); false }
private def errorNotStable(tpt: Tree, found: Type) = { TypeNotAStablePrefixError(tpt, found); false }

0 comments on commit 9a43611

Please sign in to comment.