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.
null.synchronized
1 parent 70b912a commit dcade51Copy full SHA for dcade51
test/files/run/t8601d.flags
@@ -0,0 +1 @@
1
+-optimize
test/files/run/t8601d.scala
@@ -0,0 +1,8 @@
+object Test {
2
+ def monitor(x: AnyRef): Unit = {x.synchronized(()); ()}
3
+ def check(x: => Any) = try { x; sys.error("failed to throw NPE") } catch { case _: NullPointerException => }
4
+
5
+ def main(args: Array[String]) {
6
+ check(monitor(null))
7
+ }
8
+}
0 commit comments