summaryrefslogtreecommitdiff
path: root/test/files/pos/t4840.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t4840.scala')
-rw-r--r--test/files/pos/t4840.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/pos/t4840.scala b/test/files/pos/t4840.scala
new file mode 100644
index 0000000000..bf44f71d7a
--- /dev/null
+++ b/test/files/pos/t4840.scala
@@ -0,0 +1,13 @@
+class Crashy {
+ def g(): Option[Any] = None
+
+ def crashy() = {
+ for (_ <- g()) {
+ (null: Any) match {
+ case Some(_) => 5
+ case None => sys.error("")
+ }
+ }
+ }
+}
+