diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2011-06-14 12:41:48 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2011-06-14 12:41:48 +0000 |
commit | 7fa4ca91ffc1d36f0cb1fe89998578aea242e2f9 (patch) | |
tree | c8334d41540f12981edda4645e41a06e731dc622 | |
parent | 4ba275137e02e485de1b1447e780b97c4e0b3cbd (diff) | |
download | scala-7fa4ca91ffc1d36f0cb1fe89998578aea242e2f9.tar.gz scala-7fa4ca91ffc1d36f0cb1fe89998578aea242e2f9.tar.bz2 scala-7fa4ca91ffc1d36f0cb1fe89998578aea242e2f9.zip |
closes #4547.
review by rompf -- odersky may want to take a quick look and update the spec
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 3 | ||||
-rw-r--r-- | test/files/pos/t4547.scala | 4 |
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 |