aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-02-16 13:49:02 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-16 13:49:02 +0100
commit5c21583669ff9128784ce128d36e723b9d4517ee (patch)
treeb5753f4c216a790388681b5a2ab57ced397ba78c /tests
parentc4be2191e0c17767911377d7bc835d1b40eb39af (diff)
downloaddotty-5c21583669ff9128784ce128d36e723b9d4517ee.tar.gz
dotty-5c21583669ff9128784ce128d36e723b9d4517ee.tar.bz2
dotty-5c21583669ff9128784ce128d36e723b9d4517ee.zip
Add test case
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/i576.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/pos/i576.scala b/tests/pos/i576.scala
new file mode 100644
index 000000000..77b38d742
--- /dev/null
+++ b/tests/pos/i576.scala
@@ -0,0 +1,18 @@
+class A
+
+object Impl {
+ def foo()(implicit x: A = null): Int = 2
+ def test: Int = {
+ foo()() // ok
+ foo() // did not work before, does now
+ }
+}
+
+// same with multiple parameters
+object Impl2 {
+ def foo()(implicit ev: Int, x: A = null): Int = 2
+ def test: Int = {
+ implicit val ii: Int = 1
+ foo()
+ }
+}