From 89bacb9c25a58454ff1878e67f7ea07ffc8c269f Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Tue, 12 May 2015 18:30:53 +0200 Subject: Run tests as they were in scala. --- tests/pending/run/t298.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/pending/run/t298.scala (limited to 'tests/pending/run/t298.scala') diff --git a/tests/pending/run/t298.scala b/tests/pending/run/t298.scala new file mode 100644 index 000000000..bfc219ec5 --- /dev/null +++ b/tests/pending/run/t298.scala @@ -0,0 +1,17 @@ +object Test extends App { + implicit def anyList[T]: List[T] = Nil + + implicit def intList: List[Int] = 42::24::Nil + + def foo[T](implicit x: T) = x + + val s = foo[List[Int]] + + println(s) // correct - prints "List(42, 24)" + + implicit def tupleList[T](implicit t: List[T]): List[(T,T)] = t.map(x => (x,x)) + + val t = foo[List[Tuple2[Int,Int]]] + + println(t) // incorrect - prints "List()" +} -- cgit v1.2.3