Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/typer/Applications.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2214,13 +2214,13 @@ trait Applications extends Compatibility {
case _ => (Nil, 0)

/** Resolve overloading by mapping to a different problem where each alternative's
* type is mapped with `f`, alternatives with non-existing types are dropped, and the
* type is mapped with `f`, alternatives with non-existing types or symbols are dropped, and the
* expected type is `pt`. Map the results back to the original alternatives.
*/
def resolveMapped(alts: List[TermRef], f: TermRef => Type, pt: Type)(using Context): List[TermRef] =
val reverseMapping = alts.flatMap { alt =>
val t = f(alt)
if t.exists then
if t.exists && alt.symbol.exists then
val (trimmed, skipped) = trimParamss(t.stripPoly, alt.symbol.rawParamss)
val mappedSym = alt.symbol.asTerm.copy(info = t)
mappedSym.rawParamss = trimmed
Expand Down
12 changes: 12 additions & 0 deletions tests/pos/i20176.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type Accumulator[A]

object Accumulator {

val usage =
use[Int]:
"asd"

inline def use[A](using DummyImplicit): [B] => Any => Any = ???

inline def use[A]: [B] => Any => Any = ???
}