diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-05-31 14:49:30 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-06-08 21:44:18 +0200 |
commit | d5288f808774b5a11f40378546bcd7512ec8909a (patch) | |
tree | ddecf66ce9ddadda4a48bebcfd5cda5438087de2 /test/files/pos | |
parent | 618126dc6819ca03452da99c46cf89739be8210e (diff) | |
download | scala-d5288f808774b5a11f40378546bcd7512ec8909a.tar.gz scala-d5288f808774b5a11f40378546bcd7512ec8909a.tar.bz2 scala-d5288f808774b5a11f40378546bcd7512ec8909a.zip |
SI-7505 Test case for pattern matcher + type alias bug
Progressed along with SI-7214 in acd74cae09.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t7505.scala | 16 |
1 files changed, 16 insertions, 0 deletions
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 |