Skip to content
Browse files

SI-7505 Test case for pattern matcher + type alias bug

Progressed along with SI-7214 in acd74ca.
  • Loading branch information...
1 parent 618126d commit d5288f808774b5a11f40378546bcd7512ec8909a @retronym retronym committed May 31, 2013
Showing with 16 additions and 0 deletions.
  1. +16 −0 test/files/pos/t7505.scala
View
16 test/files/pos/t7505.scala
@@ -0,0 +1,16 @@
+import scala.language.reflectiveCalls
+
+case class ContextProperty(value: Any) {
+ type HasToInt = { def toInt:Int }
+
+ def toInt: Int = value match {
+ case n: HasToInt => n.toInt
+ }
+}
+
+// was:
+// error:7: error during expansion of this match (this is a scalac bug).
+// The underlying error was: type mismatch;
+// found : Boolean(true)
+// required: AnyRef
+// def toInt: Int = value match {

0 comments on commit d5288f8

Please sign in to comment.
Something went wrong with that request. Please try again.