summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean McDirmid <sean.mcdirmid@gmail.com>2008-08-31 03:01:18 +0000
committerSean McDirmid <sean.mcdirmid@gmail.com>2008-08-31 03:01:18 +0000
commitea2fa34a568aa7fbcec7e17703d736bc2028d573 (patch)
tree2296cc5545b9efe96ac4a6608bfa4c01bcd5ad3f /src
parentfc1e62681caebfbc721eb4efc9036654e04c091b (diff)
downloadscala-ea2fa34a568aa7fbcec7e17703d736bc2028d573.tar.gz
scala-ea2fa34a568aa7fbcec7e17703d736bc2028d573.tar.bz2
scala-ea2fa34a568aa7fbcec7e17703d736bc2028d573.zip
Adding null pointer check to checkDead to fix b...
Adding null pointer check to checkDead to fix bug report #1302.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index 16e99a2d99..8d9fed4006 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -1271,7 +1271,7 @@ trait Infer {
}
def checkDead(tree: Tree): Tree = {
- if (settings.Xwarndeadcode.value && tree.tpe.typeSymbol == NothingClass)
+ if (settings.Xwarndeadcode.value && tree.tpe != null && tree.tpe.typeSymbol == NothingClass)
context.warning (tree.pos, "dead code following this construct")
tree
}