From d5288f808774b5a11f40378546bcd7512ec8909a Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Fri, 31 May 2013 14:49:30 +0200 Subject: SI-7505 Test case for pattern matcher + type alias bug Progressed along with SI-7214 in acd74cae09. --- test/files/pos/t7505.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/files/pos/t7505.scala (limited to 'test/files') diff --git a/test/files/pos/t7505.scala b/test/files/pos/t7505.scala new file mode 100644 index 0000000000..3e1e6ab8b4 --- /dev/null +++ b/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 { \ No newline at end of file -- cgit v1.2.3