Skip to content

Commit 55dbf64

Browse files
oderskyKordyjan
authored andcommitted
Fix curried overloading resolution for polymorphic methods
Fixes #16484
1 parent 3beadfb commit 55dbf64

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)