diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-08-24 00:54:59 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-08-24 00:56:45 +0200 |
commit | 21105654c40ed0c462142bcbb6c8eced77f8b07a (patch) | |
tree | 0a3f5d521f71c36e0ba205cd712465909f92d48d /test/files/pos | |
parent | 67de646839f664864a3eeb640973b62c44ffa016 (diff) | |
download | scala-21105654c40ed0c462142bcbb6c8eced77f8b07a.tar.gz scala-21105654c40ed0c462142bcbb6c8eced77f8b07a.tar.bz2 scala-21105654c40ed0c462142bcbb6c8eced77f8b07a.zip |
SI-3577 Make varianceInType aware of BoundedWildcardType.
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t3577.scala | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/files/pos/t3577.scala b/test/files/pos/t3577.scala new file mode 100644 index 0000000000..80a280f67a --- /dev/null +++ b/test/files/pos/t3577.scala @@ -0,0 +1,29 @@ +case class Check[A](val value: A) + +case class C2(checks: Check[_]*); + +object C { + def m(x : C2): Any = (null: Any) match { + case C2(_, rest @ _*) => { + rest.map(_.value) + } + } +} + +/////////////////// + +object Container { + trait Exp[+T] + abstract class FuncExp[-S, +T] + + sealed abstract class FoundNode[T, Repr] { + def optimize[TupleT, U, That](parentNode: FlatMap[T, Repr, U, That]): Any + def optimize2[TupleT, U, That](parentNode: Any): Any + } + + class FlatMap[T, Repr, U, That] + + val Seq(fn: FoundNode[t, repr]) = Seq[FoundNode[_, _]]() + fn.optimize(null) // was: scala.MatchError: ? (of class BoundedWildcardType) @ Variances#varianceInType + fn.optimize2(null) // was: fatal error: bad type: ?(class scala.reflect.internal.Types$BoundedWildcardType) @ Pickle.putType +} |