aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i2234.scala
blob: 8173c2091aadb8e8ecd95ec6ef43f8cd6f647af2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
object Test {
  type Dummy[A] = A

  def a(d: Dummy[String]) = ()
  def a(d: Dummy[Int]) = ()

  implicit def dummy[A]: Dummy[A] = null.asInstanceOf[A]
  def m(x: List[String])(implicit d: Dummy[String]) = "string"
  def m(x: List[Int])(implicit d: Dummy[Int]) = "int"

  m(List(1, 2, 3))
  m(List("a"))
}