scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.89k stars 1.06k forks source link

Drop phase.isTyper use in isLegalPrefix/asf #21954

Closed dwijnand closed 4 days ago

dwijnand commented 1 week ago

Note that "asSeenFrom" (aka asf) is used by SymDenotation#findMember, which is used by TypeComparer's "hasMatchingMember", as a part of "compareRefinedSlow".

Previously (using the minimisation in i17222.8.scala) summonOne is inlined during the "inlining" phase, while "summonInline" is inlined during typing. The result is that during inlining we fail to find Reader[BC, Int] because we incorrectly consider A{type F = Int} as stable.

Fixes #17222