aboutsummaryrefslogtreecommitdiff
path: root/tests/run
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run')
-rw-r--r--tests/run/i1432.check2
-rw-r--r--tests/run/i1432.scala11
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/run/i1432.check b/tests/run/i1432.check
new file mode 100644
index 000000000..ace7d40d3
--- /dev/null
+++ b/tests/run/i1432.check
@@ -0,0 +1,2 @@
+Some(foo)
+foo
diff --git a/tests/run/i1432.scala b/tests/run/i1432.scala
new file mode 100644
index 000000000..e71b76f8e
--- /dev/null
+++ b/tests/run/i1432.scala
@@ -0,0 +1,11 @@
+object Test {
+
+ def main(args: Array[String]): Unit = {
+ val someFoo = Some("foo")
+ val _ @ bar = someFoo
+ val _ @ Some(baz) = someFoo
+ println(bar)
+ println(baz)
+ }
+
+}