Skip to content

Commit

Permalink
Fix curried overloading resolution for polymorphic methods
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky authored and Kordyjan committed Dec 22, 2022
1 parent 3beadfb commit 55dbf64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Applications.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2140,7 +2140,7 @@ trait Applications extends Compatibility {
val reverseMapping = alts.flatMap { alt =>
val t = f(alt)
if t.exists then
val (trimmed, skipped) = trimParamss(t, alt.symbol.rawParamss)
val (trimmed, skipped) = trimParamss(t.stripPoly, alt.symbol.rawParamss)
val mappedSym = alt.symbol.asTerm.copy(info = t)
mappedSym.rawParamss = trimmed
val (pre, totalSkipped) = mappedAltInfo(alt.symbol) match
Expand Down
3 changes: 3 additions & 0 deletions tests/pos/i16484.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
trait JWTEncoder:
def encode[P](arg: String)(opt: Option[String] = None): String
def encode[P](arg: String): String = encode(arg)()

0 comments on commit 55dbf64

Please sign in to comment.