Permalink
Browse files

Test case for SI-5378

  • Loading branch information...
phaller committed May 8, 2012
1 parent aa555de commit 71c17a649ec01ecdc55cbe12b42abdba1285a755
Showing with 19 additions and 0 deletions.
  1. +19 −0 test/pending/neg/t5378.scala
@@ -0,0 +1,19 @@
import language.reflectiveCalls
class Coll[+T] {
def contains = new { def apply[T1 <: T](value: T1) = ??? }
}
object Test {
def main(args: Array[String]): Unit = {
val xs = new Coll[List[String]]
val ys: Coll[Traversable[String]] = xs
println(ys contains Nil)
// java.lang.NoSuchMethodException: Coll$$anon$1.apply(scala.collection.Traversable)
// at java.lang.Class.getMethod(Class.java:1605)
// at Test$.reflMethod$Method1(a.scala:14)
// at Test$.main(a.scala:14)
// at Test.main(a.scala)
}
}

0 comments on commit 71c17a6

Please sign in to comment.