diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-06-09 12:32:51 -0700 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-06-09 12:32:51 -0700 |
commit | e3c318649c4318412c8d7e3cbee4689489f6ccb1 (patch) | |
tree | 4f12cb22f157ae631afb05335f40f597fd23936a /test | |
parent | 076e37bb67001fe3ca1e120c9c3ac63c1de5ea01 (diff) | |
parent | d5288f808774b5a11f40378546bcd7512ec8909a (diff) | |
download | scala-e3c318649c4318412c8d7e3cbee4689489f6ccb1.tar.gz scala-e3c318649c4318412c8d7e3cbee4689489f6ccb1.tar.bz2 scala-e3c318649c4318412c8d7e3cbee4689489f6ccb1.zip |
Merge pull request #2616 from retronym/ticket/7505
SI-7505 Test case for pattern matcher + type alias bug
Diffstat (limited to 'test')
-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 |