summaryrefslogtreecommitdiff
path: root/src/interactive/scala/tools/nsc
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-12-17 10:27:42 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-01-08 20:46:44 +0100
commit7e0eee211fee8958e93fad646846f1df0405d499 (patch)
tree65e5e764d651a62e9f2033874cbfd08b975dccb0 /src/interactive/scala/tools/nsc
parent4e4c15177b92ef25f098277dcce3f874c24640b2 (diff)
downloadscala-7e0eee211fee8958e93fad646846f1df0405d499.tar.gz
scala-7e0eee211fee8958e93fad646846f1df0405d499.tar.bz2
scala-7e0eee211fee8958e93fad646846f1df0405d499.zip
More robust hyperlink tests for the presentation compiler
Report null symbols in an civilised manner, rather than with a NPE.
Diffstat (limited to 'src/interactive/scala/tools/nsc')
-rw-r--r--src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala b/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala
index bc490d8d45..343986a45d 100644
--- a/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala
+++ b/src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala
@@ -94,7 +94,7 @@ private[tests] trait CoreTestDefs
askAllSources(HyperlinkMarker) { pos =>
askTypeAt(pos)(NullReporter)
} { (pos, tree) =>
- if(tree.symbol == compiler.NoSymbol) {
+ if(tree.symbol == compiler.NoSymbol || tree.symbol == null) {
reporter.println("\nNo symbol is associated with tree: "+tree)
}
else {