summaryrefslogtreecommitdiff
path: root/test/files/neg/bug3392.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-06 16:34:10 +0000
committerPaul Phillips <paulp@improving.org>2011-05-06 16:34:10 +0000
commit9654d5149166464987b7f8aa6c6d2cae8cbb3ae6 (patch)
treebc6c03fe867588087e28144c9fe13a976748fdab /test/files/neg/bug3392.scala
parenta6d0d9dd0de962147b184b39c2169c2d47673cd8 (diff)
downloadscala-9654d5149166464987b7f8aa6c6d2cae8cbb3ae6.tar.gz
scala-9654d5149166464987b7f8aa6c6d2cae8cbb3ae6.tar.bz2
scala-9654d5149166464987b7f8aa6c6d2cae8cbb3ae6.zip
Tightened a condition to avoid a self-referenti...
Tightened a condition to avoid a self-referential pattern variable crash. Closes #3392, no review.
Diffstat (limited to 'test/files/neg/bug3392.scala')
-rw-r--r--test/files/neg/bug3392.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/bug3392.scala b/test/files/neg/bug3392.scala
new file mode 100644
index 0000000000..655c2e84a3
--- /dev/null
+++ b/test/files/neg/bug3392.scala
@@ -0,0 +1,11 @@
+object Test {
+ case class A(a: Int) {
+ object Ex {
+ def unapply(i: Int): Option[Int] = Some(i)
+ }
+ }
+
+ A(42) match {
+ case x@A(x/*<-- refers to the pattern that includes this comment*/.Ex(42)) =>
+ }
+}