From 1acfcd150ebf91cc3609634a703c80c9628c434a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 22 Aug 2013 09:19:39 +0200 Subject: Added some first test files to compile --- tests/pos/implicits1.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/pos/implicits1.scala (limited to 'tests/pos/implicits1.scala') diff --git a/tests/pos/implicits1.scala b/tests/pos/implicits1.scala new file mode 100644 index 000000000..bedcc11b7 --- /dev/null +++ b/tests/pos/implicits1.scala @@ -0,0 +1,17 @@ +class X extends Object + +object Implicits { + + implicit val impl: X = new X + + val a: Object = "abc" + val b: Any = "abc" + + def foo(x: Int)(implicit y: X): Int = { + println(y) + x + } + + val y: Int = foo(1) + +} -- cgit v1.2.3