File tree 2 files changed +14
-2
lines changed
compiler/src/dotty/tools/dotc/typer
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -2214,13 +2214,13 @@ trait Applications extends Compatibility {
2214
2214
case _ => (Nil , 0 )
2215
2215
2216
2216
/** Resolve overloading by mapping to a different problem where each alternative's
2217
- * type is mapped with `f`, alternatives with non-existing types are dropped, and the
2217
+ * type is mapped with `f`, alternatives with non-existing types or symbols are dropped, and the
2218
2218
* expected type is `pt`. Map the results back to the original alternatives.
2219
2219
*/
2220
2220
def resolveMapped (alts : List [TermRef ], f : TermRef => Type , pt : Type )(using Context ): List [TermRef ] =
2221
2221
val reverseMapping = alts.flatMap { alt =>
2222
2222
val t = f(alt)
2223
- if t.exists then
2223
+ if t.exists && alt.symbol.exists then
2224
2224
val (trimmed, skipped) = trimParamss(t.stripPoly, alt.symbol.rawParamss)
2225
2225
val mappedSym = alt.symbol.asTerm.copy(info = t)
2226
2226
mappedSym.rawParamss = trimmed
Original file line number Diff line number Diff line change
1
+ type Accumulator [A ]
2
+
3
+ object Accumulator {
4
+
5
+ val usage =
6
+ use[Int ]:
7
+ " asd"
8
+
9
+ inline def use [A ](using DummyImplicit ): [B ] => Any => Any = ???
10
+
11
+ inline def use [A ]: [B ] => Any => Any = ???
12
+ }
You can’t perform that action at this time.
0 commit comments