Skip to content

Commit ebe5828

Browse files
committed
WIP: Temporarily disregard targetnames for certain transforms
1 parent f43f262 commit ebe5828

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

compiler/src/dotty/tools/dotc/reporting/messages.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2220,7 +2220,8 @@ import transform.SymUtils._
22202220
// does in classes, i.e. followed the linearization of the trait itself.
22212221
val staticSuperCall = {
22222222
val staticSuper = accMixin.asClass.info.parents.reverse
2223-
.find(_.nonPrivateMember(memberName).matchingDenotation(accMixin.thisType, acc.info).exists)
2223+
.find(_.nonPrivateMember(memberName)
2224+
.matchingDenotation(accMixin.thisType, acc.info, EmptyTermName).exists) // !!! TODO: Adapt to @targetName
22242225
val staticSuperName = staticSuper match {
22252226
case Some(parent) =>
22262227
parent.classSymbol.name.show

compiler/src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ object Erasure {
938938
val origName = retainer.name.asTermName.exclude(BodyRetainerName)
939939
val inlineMeth = atPhase(typerPhase) {
940940
retainer.owner.info.decl(origName)
941-
.matchingDenotation(retainer.owner.thisType, stat.symbol.info)
941+
.matchingDenotation(retainer.owner.thisType, stat.symbol.info, origName) // !!! do something baout @targetName
942942
.symbol
943943
}
944944
(inlineMeth, stat)

compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ object ResolveSuper {
9595
while (bcs.nonEmpty && sym == NoSymbol) {
9696
val other = bcs.head.info.nonPrivateDecl(memberName)
9797
.filterWithPredicate(denot => mix.isEmpty || denot.symbol.owner.name == mix)
98-
.matchingDenotation(base.thisType, base.thisType.memberInfo(acc))
98+
.matchingDenotation(base.thisType, base.thisType.memberInfo(acc), memberName) // !!! TODO: rebind with targetName
9999
report.debuglog(i"rebindsuper ${bcs.head} $other deferred = ${other.symbol.is(Deferred)}")
100100
if other.exists && !other.symbol.is(Deferred) then
101101
sym = other.symbol
@@ -108,7 +108,7 @@ object ResolveSuper {
108108

109109
bcs = bcs.tail
110110
}
111-
assert(sym.exists)
111+
assert(sym.exists, i"cannot rebind $acc, ${acc.erasedName} $memberName")
112112
sym
113113
}
114114
}

0 commit comments

Comments
 (0)