Skip to content

Commit 6059da4

Browse files
authored
Backports "Fix curried overloading resolution for polymorphic methods" (#16576)
Backports #16485
2 parents 6b8b31c + 55dbf64 commit 6059da4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2140,7 +2140,7 @@ trait Applications extends Compatibility {
21402140
val reverseMapping = alts.flatMap { alt =>
21412141
val t = f(alt)
21422142
if t.exists then
2143-
val (trimmed, skipped) = trimParamss(t, alt.symbol.rawParamss)
2143+
val (trimmed, skipped) = trimParamss(t.stripPoly, alt.symbol.rawParamss)
21442144
val mappedSym = alt.symbol.asTerm.copy(info = t)
21452145
mappedSym.rawParamss = trimmed
21462146
val (pre, totalSkipped) = mappedAltInfo(alt.symbol) match

tests/pos/i16484.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
trait JWTEncoder:
2+
def encode[P](arg: String)(opt: Option[String] = None): String
3+
def encode[P](arg: String): String = encode(arg)()

0 commit comments

Comments
 (0)