Skip to content

Commit f0c1894

Browse files
committed
Take implicit methods into account when computing candidates for extension methods
1 parent 6bb20b3 commit f0c1894

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Implicits.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ object Implicits {
9393
def viewCandidateKind(tpw: Type, argType: Type, resType: Type): Candidate.Kind = {
9494

9595
def methodCandidateKind(mt: MethodType, approx: Boolean) =
96-
if (!mt.isImplicitMethod &&
96+
if (mt.isImplicitMethod)
97+
viewCandidateKind(normalize(mt, pt), argType, resType)
98+
else if (!mt.isImplicitMethod &&
9799
mt.paramInfos.lengthCompare(1) == 0 && {
98100
var formal = widenSingleton(mt.paramInfos.head)
99101
if (approx) formal = wildApprox(formal)

0 commit comments

Comments
 (0)