scalacenter / tasty-query

Apache License 2.0
51 stars 11 forks source link

Work around https://github.com/lampepfl/dotty/issues/19237 #425

Closed sjrd closed 10 months ago

sjrd commented 10 months ago

It does not seem that the upstream issue will be fixed any time soon due to binary compatibility concerns. Nevertheless, it makes no sense, and it is not possible possible to create a value of a "package type".

Therefore, we work around the issue by tolerating a PackageRef as the type of a PARAM of an inline accessor method. We replace it by Nothing, which matches the fact that no value can be created for it.

Note that the signature and therefore the signed name of such a method will be different from what dotc computes, so it will still be semantically broken.