summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/TreeGen.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-03-13 16:09:31 -0700
committerPaul Phillips <paulp@improving.org>2013-03-13 16:09:31 -0700
commit2655a99237815704e67fff4ad5533df7c1d2d752 (patch)
treef42f19e410ee42c4a4c13bd966539329ff4387d6 /src/compiler/scala/tools/nsc/ast/TreeGen.scala
parent482bef8079e2a2fecc2b8f77eb7c6da648125e3c (diff)
downloadscala-2655a99237815704e67fff4ad5533df7c1d2d752.tar.gz
scala-2655a99237815704e67fff4ad5533df7c1d2d752.tar.bz2
scala-2655a99237815704e67fff4ad5533df7c1d2d752.zip
Removed -Ynotnull setting.
It never worked and it would periodically jump out and bite someone. Slash and burn so new plants can take root. Eliminated NotNullType and NotNullClass, internal elements. Removed notNull method on Type, which no longer has a purpose. Retained 'def isNotNull' because there are types which are known by construction not to be null (ThisType, ConstantType as long as the constant isn't null, etc.) and that's still useful to know.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/TreeGen.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/TreeGen.scala21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeGen.scala b/src/compiler/scala/tools/nsc/ast/TreeGen.scala
index b9eb511a9a..d195d195af 100644
--- a/src/compiler/scala/tools/nsc/ast/TreeGen.scala
+++ b/src/compiler/scala/tools/nsc/ast/TreeGen.scala
@@ -19,16 +19,17 @@ abstract class TreeGen extends scala.reflect.internal.TreeGen with TreeDSL {
import global._
import definitions._
- def mkCheckInit(tree: Tree): Tree = {
- val tpe =
- if (tree.tpe != null || !tree.hasSymbolField) tree.tpe
- else tree.symbol.tpe
-
- if (!global.phase.erasedTypes && settings.warnSelectNullable.value &&
- tpe <:< NotNullClass.tpe && !tpe.isNotNull)
- mkRuntimeCall(nme.checkInitialized, List(tree))
- else
- tree
+ def mkCheckInit(tree: Tree): Tree = { tree
+ // Leaving in the next commit...
+ // val tpe =
+ // if (tree.tpe != null || !tree.hasSymbolField) tree.tpe
+ // else tree.symbol.tpe
+
+ // if (!global.phase.erasedTypes && settings.warnSelectNullable.value &&
+ // tpe <:< NotNullClass.tpe && !tpe.isNotNull)
+ // mkRuntimeCall(nme.checkInitialized, List(tree))
+ // else
+ // tree
}
/** Builds a fully attributed wildcard import node.