aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/implicits1.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-08-22 09:19:39 +0200
committerMartin Odersky <odersky@gmail.com>2013-08-22 09:19:39 +0200
commit1acfcd150ebf91cc3609634a703c80c9628c434a (patch)
tree9723404bafa91a1e39bb1a93ebab5944be53bb5b /tests/pos/implicits1.scala
parentdb35ebf5519fe1c7f2f2870691139edc93c3d0a3 (diff)
downloaddotty-1acfcd150ebf91cc3609634a703c80c9628c434a.tar.gz
dotty-1acfcd150ebf91cc3609634a703c80c9628c434a.tar.bz2
dotty-1acfcd150ebf91cc3609634a703c80c9628c434a.zip
Added some first test files to compile
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)
+
+}