Skip to content

Commit 95c9088

Browse files
committed
Move MappedAlternative check into reorder
1 parent 8435ae0 commit 95c9088

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ object SymDenotations {
350350

351351
ensureCompleted()
352352
if rawParamss.isEmpty then recurWithoutParamss(info)
353-
else if symbol.hasAnnotation(defn.MappedAlternativeAnnot) then recurWithParamss(info.stripPoly, rawParamss)
354353
else recurWithParamss(info, rawParamss)
355354
end paramSymss
356355

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,11 @@ trait Applications extends Compatibility {
645645
version.map(v => s" (since $v)").getOrElse("")
646646

647647
val deprecatedNames: Map[Name, Annotation] =
648-
methRef.symbol.paramSymss.find(_.exists(_.isTerm)) match
648+
val sym = methRef.symbol
649+
val paramss =
650+
if sym.hasAnnotation(defn.MappedAlternativeAnnot) then sym.rawParamss
651+
else sym.paramSymss
652+
paramss.find(_.exists(_.isTerm)) match
649653
case Some(ps) if ps.exists(_.hasAnnotation(defn.DeprecatedNameAnnot)) =>
650654
ps.flatMap: p =>
651655
p.getAnnotation(defn.DeprecatedNameAnnot).map(p.name -> _)

0 commit comments

Comments
 (0)