From 5c21583669ff9128784ce128d36e723b9d4517ee Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 16 Feb 2016 13:49:02 +0100 Subject: Add test case --- tests/pos/i576.scala | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/pos/i576.scala 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() + } +} -- cgit v1.2.3