diff options
author | odersky <odersky@gmail.com> | 2016-02-18 11:55:30 +0100 |
---|---|---|
committer | odersky <odersky@gmail.com> | 2016-02-18 11:55:30 +0100 |
commit | 4be70a5a8469c1355c84bef70936a81f899a9678 (patch) | |
tree | 488bea7c57cee865d122accbf4dd34d5fd4fd43a /tests | |
parent | 3c85915ba7c98b253603fc873e6e41336a528bd6 (diff) | |
parent | 5c21583669ff9128784ce128d36e723b9d4517ee (diff) | |
download | dotty-4be70a5a8469c1355c84bef70936a81f899a9678.tar.gz dotty-4be70a5a8469c1355c84bef70936a81f899a9678.tar.bz2 dotty-4be70a5a8469c1355c84bef70936a81f899a9678.zip |
Merge pull request #1073 from dotty-staging/fix-#576
Handle implicits with default parameters.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/i576.scala | 18 |
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() + } +} |