scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

Backquoted underbar: unsupported pattern: Star / p3 #9106

Open scabug opened 9 years ago

scabug commented 9 years ago

I'm still hoping to receive my "Underbar ist wunderbar!" t-shirt. (Maybe it's even funnier in Swedish.)

This is pretty benign, but since somebody reported it:

apm@mara:~/projects/snytt$ scala210
Welcome to Scala version 2.10.4 (OpenJDK 64-Bit Server VM, Java 1.7.0_65).
Type in expressions to have them evaluated.
Type :help for more information.

scala> (1 to 9).toList match { case List(`_`*) => true }
res0: Boolean = true

scala> apm@mara:~/projects/snytt$ scala
Welcome to Scala version 2.11.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25).
Type in expressions to have them evaluated.
Type :help for more information.

scala> (1 to 9).toList match { case List(`_`*) => true }
<console>:8: error: unsupported pattern: Star / p3: List[Int] @ (`_`)* (this is a scalac bug.)
              (1 to 9).toList match { case List(`_`*) => true }
                                                   ^
scabug commented 9 years ago

Imported From: https://issues.scala-lang.org/browse/SI-9106?orig=1 Reporter: @som-snytt Affected Versions: 2.11.4