Skip to content

Commit 06725ce

Browse files
committed
Restrict test for choosing SELECTin
Test only for methods. Others cannot get signature clashes through asSeenFrom. That is, if they clash after asSeenFrom, they already clash before.
1 parent f9da2cd commit 06725ce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,10 @@ class TreePickler(pickler: TastyPickler) {
384384
case _ =>
385385
val sig = tree.tpe.signature
386386
val isAmbiguous =
387-
qual.tpe.nonPrivateMember(name).atSignature(sig) match
387+
sig != NotAMethod && qual.tpe.nonPrivateMember(name).match
388388
case d: MultiDenotation => d.atSignature(sig).isInstanceOf[MultiDenotation]
389389
case _ => false
390390
if isAmbiguous then
391-
assert(tree.symbol.isTerm)
392391
writeByte(SELECTin)
393392
withLength {
394393
pickleNameAndSig(name, tree.symbol.signature)

0 commit comments

Comments
 (0)