summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Implicits.scala3
-rw-r--r--test/files/pos/t4547.scala4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
index e30f69e858..7d4d42c224 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
@@ -918,6 +918,9 @@ trait Implicits {
getParts(tp.widen)
case _: SingletonType =>
getParts(tp.widen)
+ case HasMethodMatching(_, argtpes, restpe) =>
+ for (tp <- argtpes) getParts(tp)
+ getParts(restpe)
case RefinedType(ps, _) =>
for (p <- ps) getParts(p)
case AnnotatedType(_, t, _) =>
diff --git a/test/files/pos/t4547.scala b/test/files/pos/t4547.scala
new file mode 100644
index 0000000000..01f229bbf6
--- /dev/null
+++ b/test/files/pos/t4547.scala
@@ -0,0 +1,4 @@
+object Main {
+ def g: BigInt = 5 + BigInt(4) // since we're looking for an implicit that converts an int into something that has a + method that takes a BigInt, BigInt should be in the implicit scope
+ def g2 = 5 + BigInt(4)
+} \ No newline at end of file