@@ -1057,6 +1057,8 @@ class TreeUnpickler(reader: TastyReader,
1057
1057
}
1058
1058
1059
1059
def makeSelect (qual : Tree , name : Name , denot : Denotation ): Select =
1060
+ // if ctx.source.name.startsWith("hashsetremove") then
1061
+ // report.echo(i"select $denot from $qual.$name")
1060
1062
var qualType = qual.tpe.widenIfUnstable
1061
1063
val owner = denot.symbol.maybeOwner
1062
1064
if (owner.isPackageObject && qualType.termSymbol.is(Package ))
@@ -1078,7 +1080,14 @@ class TreeUnpickler(reader: TastyReader,
1078
1080
1079
1081
def accessibleDenot (qualType : Type , name : Name , sig : Signature , target : Name ) = {
1080
1082
val pre = ctx.typeAssigner.maybeSkolemizePrefix(qualType, name)
1081
- val d = qualType.findMember(name, pre).atSignature(sig, target)
1083
+ // if ctx.source.name.startsWith("hashsetremove") then
1084
+ // report.echo(i"accessibleDenot $name @ $sig from $pre")
1085
+ val d0 = qualType.findMember(name, pre)
1086
+ // if ctx.source.name.startsWith("hashsetremove") then
1087
+ // report.echo(i"d0 = $d0")
1088
+ val d = d0.atSignature(sig, target)
1089
+ // if ctx.source.name.startsWith("hashsetremove") then
1090
+ // report.echo(i"d = $d")
1082
1091
if (! d.symbol.exists || d.symbol.isAccessibleFrom(pre)) d
1083
1092
else qualType.findMember(name, pre, excluded = Private ).atSignature(sig, target)
1084
1093
}
@@ -1184,16 +1193,8 @@ class TreeUnpickler(reader: TastyReader,
1184
1193
// Test Report
1185
1194
// ================================================================================
1186
1195
1187
- // tests/run/eff-dependent.scala failed
1188
- // tests/pos/conversion-function-prototype.scala failed
1189
- // tests/pos/i8516.scala failed
1190
- // tests/pos/avoid.scala failed
1191
- // tests/pos/i7872.scala failed
1192
- // tests/pos/i5980.scala failed
1193
- // tests/pos/i5418.scala failed
1194
- // tests/pos/depfuntype.scala failed
1195
- // tests/pos/i5720.scala failed
1196
- // tests/pos/i7807.scala failed
1196
+
1197
+ // tests/run/hashsetremove.scala
1197
1198
var sname = readName()
1198
1199
val qual = readTerm()
1199
1200
val qualType = qual.tpe.widenIfUnstable
@@ -1205,9 +1206,11 @@ class TreeUnpickler(reader: TastyReader,
1205
1206
sname match
1206
1207
case SignedName (name, sig, target) =>
1207
1208
val pre = ctx.typeAssigner.maybeSkolemizePrefix(qualType, name)
1208
- val isAmbiguous = pre.nonPrivateMember(name).isOverloaded
1209
- if ctx.source.name.startsWith(" i9050" ) then
1210
- report.echo(i " select $name at $sig isAmbig? $isAmbiguous" )
1209
+ val isAmbiguous =
1210
+ val denot = pre.nonPrivateMember(name)
1211
+ denot.isOverloaded || ! denot.atSignature(sig, target).exists
1212
+ // if ctx.source.name.startsWith("hashsetremove") then
1213
+ // report.echo(i"select $name at $sig isAmbig? $isAmbiguous - ${pre.nonPrivateMember(name)}")
1211
1214
if isAmbiguous then
1212
1215
selectAmbiguous(name, pre, space.decl(name).atSignature(sig, target))
1213
1216
else
0 commit comments