diff options
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/bug4840.flags | 1 | ||||
-rw-r--r-- | test/files/pos/bug4840.scala | 13 |
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("") + } + } + } +} + |