diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-08-17 20:38:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-17 20:38:57 -0700 |
commit | 5a5f9d7ed37ca6449ef61ee5e0f6fbf9731df795 (patch) | |
tree | bf3c9bc5760db020986aec535c4f5e086cbac4f4 /tests | |
parent | aaa32f70da1df75e0571a080a1738634b8bad6c6 (diff) | |
parent | 0b2ddd0df33bf529b062dc6167b50a33fa5f84b7 (diff) | |
download | dotty-5a5f9d7ed37ca6449ef61ee5e0f6fbf9731df795.tar.gz dotty-5a5f9d7ed37ca6449ef61ee5e0f6fbf9731df795.tar.bz2 dotty-5a5f9d7ed37ca6449ef61ee5e0f6fbf9731df795.zip |
Merge pull request #1452 from dotty-staging/fix-#1432
Fix desugaring of Bind(WILDCARD, _).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/i1432.scala | 3 | ||||
-rw-r--r-- | tests/run/i1432.check | 2 | ||||
-rw-r--r-- | tests/run/i1432.scala | 11 |
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/pos/i1432.scala b/tests/pos/i1432.scala new file mode 100644 index 000000000..fb9d4c6ab --- /dev/null +++ b/tests/pos/i1432.scala @@ -0,0 +1,3 @@ +object Foo { + val _@a = 1 // This entered in an infinite loop +} 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) + } + +} |