summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/bug4840.flags1
-rw-r--r--test/files/pos/bug4840.scala13
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/pos/bug4840.flags b/test/files/pos/bug4840.flags
new file mode 100644
index 0000000000..eb4d19bcb9
--- /dev/null
+++ b/test/files/pos/bug4840.flags
@@ -0,0 +1 @@
+-optimise \ No newline at end of file
diff --git a/test/files/pos/bug4840.scala b/test/files/pos/bug4840.scala
new file mode 100644
index 0000000000..bf44f71d7a
--- /dev/null
+++ b/test/files/pos/bug4840.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("")
+ }
+ }
+ }
+}
+