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