We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3d6157 commit b11a27eCopy full SHA for b11a27e
test/files/run/t8601b.scala
@@ -1,11 +1,9 @@
1
object Test {
2
def len(x: Array[String]): Unit = x.length
3
- def load(x: Array[String]): Unit = x(0)
4
5
def check(x: => Any) = try { x; sys.error("failed to throw NPE!") } catch { case _: NullPointerException => }
6
7
def main(args: Array[String]) {
8
- check(len(null)) // bug: did not NPE
9
- check(load(null))
+ check(len(null))
10
}
11
0 commit comments