diff options
author | aleksandar <aleksandar@lampmac14.epfl.ch> | 2012-01-12 15:38:55 +0100 |
---|---|---|
committer | aleksandar <aleksandar@lampmac14.epfl.ch> | 2012-01-12 15:38:55 +0100 |
commit | 91fcdf64d406aed26d473091c3328c0cf089e115 (patch) | |
tree | e3897d0cc6b680d32581a740b16a4ad5ef0839ef /test/files/pos/t4070.scala | |
parent | 51ddeb372b3f0b22041d9a51f3faee17acd7b749 (diff) | |
parent | 5f5029d2ac6348ecb07fc11f6656621c662ced92 (diff) | |
download | scala-91fcdf64d406aed26d473091c3328c0cf089e115.tar.gz scala-91fcdf64d406aed26d473091c3328c0cf089e115.tar.bz2 scala-91fcdf64d406aed26d473091c3328c0cf089e115.zip |
Merge branch 'master' into issue/4147
Conflicts:
.gitignore
Diffstat (limited to 'test/files/pos/t4070.scala')
-rw-r--r-- | test/files/pos/t4070.scala | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/files/pos/t4070.scala b/test/files/pos/t4070.scala new file mode 100644 index 0000000000..29c8d16e30 --- /dev/null +++ b/test/files/pos/t4070.scala @@ -0,0 +1,37 @@ +package a { + // method before classes + trait Foo { + def crash(x: Dingus[_]): Unit = x match { case m: Bippy[tv] => () } + + class Dingus[T] + class Bippy[CC[X] <: Seq[X]]() extends Dingus[CC[Int]] + } +} + +package b { + // classes before method + trait Foo { + class Dingus[T] + class Bippy[CC[X] <: Seq[X]]() extends Dingus[CC[Int]] + + def crash(x: Dingus[_]): Unit = x match { case m: Bippy[tv] => () } + } +} + + +/* +// With crash below the clasess: +% scalac -Dscalac.debug.tvar ./a.scala +[ create] ?_$1 ( In Foo#crash ) +[ setInst] tv[Int] ( In Foo#crash, _$1=tv[Int] ) +[ create] tv[Int] ( In Foo#crash ) +[ clone] tv[Int] ( Foo#crash ) + +// With crash above the classes: +% scalac -Dscalac.debug.tvar ./a.scala +[ create] ?tv ( In Foo#crash ) +./a.scala:2: error: Invalid type application in TypeVar: List(), List(Int) + def crash(x: Dingus[_]): Unit = x match { case m: Bippy[tv] => () } + ^ +one error found +*/ |