diff options
author | Paul Phillips <paulp@improving.org> | 2011-03-06 21:33:18 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-03-06 21:33:18 +0000 |
commit | 603c3dae0f74ccb9d9b34c9c004713ca3d0e8847 (patch) | |
tree | a02a7bd8b39879a328dfcdd7b148870b37ada6f9 /test | |
parent | 64660068dd89813c7c7a09db1e783177ac31f158 (diff) | |
download | scala-603c3dae0f74ccb9d9b34c9c004713ca3d0e8847.tar.gz scala-603c3dae0f74ccb9d9b34c9c004713ca3d0e8847.tar.bz2 scala-603c3dae0f74ccb9d9b34c9c004713ca3d0e8847.zip |
And extempore's original plan carries the day: ...
And extempore's original plan carries the day: null.## no longer throws
an NPE. Took advantage of feature to simplify a bunch of sharp-sharp
calculations. Closes #4311, no review.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/null-hash.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/null-hash.scala b/test/files/run/null-hash.scala new file mode 100644 index 0000000000..9b1f28b083 --- /dev/null +++ b/test/files/run/null-hash.scala @@ -0,0 +1,15 @@ +object Test { + def f1 = List(5, 10, null: String).## + def f2(x: Any) = x.## + def f3 = ((55, "abc", null: List[Int])).## + + def main(args: Array[String]): Unit = { + f1 + f2(null) + f2(null: String) + f3 + null.## + (null: Any).## + (null: String).## + } +} |