aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/implicits1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos/implicits1.scala')
-rw-r--r--tests/pos/implicits1.scala17
1 files changed, 17 insertions, 0 deletions
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)
+
+}