Skip to content

Commit

Permalink
Test case for SI-5378
Browse files Browse the repository at this point in the history
  • Loading branch information
phaller committed May 8, 2012
1 parent aa555de commit 71c17a6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions 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.