Skip to content

Commit 1fdacc7

Browse files
committed
added retry-type to overloaded argument
1 parent bdf634c commit 1fdacc7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/quoted/QuoteContextImpl.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,8 @@ class QuoteContextImpl private (ctx: Context) extends QuoteContext:
412412
val denot = qualifier.tpe.member(name.toTermName)
413413
assert(!denot.isOverloaded, s"The symbol `$name` is overloaded. The method Select.unique can only be used for non-overloaded symbols.")
414414
withDefaultPos(tpd.Select(qualifier, name.toTermName))
415-
def overloaded(qualifier: Term, name: String, targs: List[Type], args: List[Term]): Apply =
416-
withDefaultPos(tpd.applyOverloaded(qualifier, name.toTermName, args, targs, Types.WildcardType).asInstanceOf[Apply])
415+
def overloaded(qualifier: Term, name: String, targs: List[Type], args: List[Term], returnType: Type): Apply =
416+
withDefaultPos(tpd.applyOverloaded(qualifier, name.toTermName, args, targs, returnType).asInstanceOf[Apply])
417417
def copy(original: Tree)(qualifier: Term, name: String): Select =
418418
tpd.cpy.Select(original)(qualifier, name.toTermName)
419419
def unapply(x: Select): Option[(Term, String)] =

library/src/scala/tasty/Reflection.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ trait Reflection { reflection =>
514514

515515
// TODO rename, this returns an Apply and not a Select
516516
/** Call an overloaded method with the given type and term parameters */
517-
def overloaded(qualifier: Term, name: String, targs: List[Type], args: List[Term]): Apply
517+
def overloaded(qualifier: Term, name: String, targs: List[Type], args: List[Term], returnType: Type): Apply
518518

519519
def copy(original: Tree)(qualifier: Term, name: String): Select
520520

0 commit comments

Comments
 (0)