File tree 1 file changed +15
-12
lines changed
compiler/src/dotty/tools/dotc/core/tasty 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -383,19 +383,22 @@ class TreePickler(pickler: TastyPickler) {
383
383
}
384
384
case _ =>
385
385
val sig = tree.tpe.signature
386
- qual.tpe.nonPrivateMember(name).atSignature(sig) match
387
- case d : MultiDenotation =>
388
- assert(tree.symbol.isTerm)
389
- writeByte(SELECTin )
390
- withLength {
391
- pickleNameAndSig(name, tree.symbol.signature)
392
- pickleTree(qual)
393
- pickleType(tree.symbol.owner.typeRef)
394
- }
395
- case _ =>
396
- writeByte(if (name.isTypeName) SELECTtpt else SELECT )
397
- pickleNameAndSig(name, sig)
386
+ val isAmbiguous =
387
+ qual.tpe.nonPrivateMember(name).atSignature(sig) match
388
+ case d : MultiDenotation => d.atSignature(sig).isInstanceOf [MultiDenotation ]
389
+ case _ => false
390
+ if isAmbiguous then
391
+ assert(tree.symbol.isTerm)
392
+ writeByte(SELECTin )
393
+ withLength {
394
+ pickleNameAndSig(name, tree.symbol.signature)
398
395
pickleTree(qual)
396
+ pickleType(tree.symbol.owner.typeRef)
397
+ }
398
+ else
399
+ writeByte(if (name.isTypeName) SELECTtpt else SELECT )
400
+ pickleNameAndSig(name, sig)
401
+ pickleTree(qual)
399
402
}
400
403
case Apply (fun, args) =>
401
404
if (fun.symbol eq defn.throwMethod) {
You can’t perform that action at this time.
0 commit comments