summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala3
-rw-r--r--test/files/run/t8197b.scala8
2 files changed, 10 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index 50744f2d72..b42113c84f 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -1328,7 +1328,8 @@ trait Infer extends Checkable {
eligible
else
eligible filter (alt =>
- !mexists(alt.info.paramss)(_.hasDefault) && isApplicableBasedOnArity(alt.tpe, argtpes.length, varargsStar, tuplingAllowed = true)
+ !alt.info.params.exists(_.hasDefault) // run/t8197b first parameter list only!
+ && isApplicableBasedOnArity(alt.tpe, argtpes.length, varargsStar, tuplingAllowed = true)
)
}
diff --git a/test/files/run/t8197b.scala b/test/files/run/t8197b.scala
new file mode 100644
index 0000000000..8b3e0af0db
--- /dev/null
+++ b/test/files/run/t8197b.scala
@@ -0,0 +1,8 @@
+object O {
+ def foo[T](t: T) = 0
+ def foo(s: String)(implicit i: DummyImplicit = null) = 1
+}
+
+object Test extends App {
+ assert(O.foo("") == 1)
+}