Skip to content

Conversation

@WojciechMazur
Copy link
Contributor

Backports #19773 to the LTS branch.

PR submitted by the release tooling.
[skip ci]

WojciechMazur and others added 7 commits July 2, 2024 22:30
To find Scala companion mudule from Java in mixed sources, we should strip module suffix `$`. This provides workaround for #17255, but it requires some refinment to fix it because not-fully-qualified type like the following example still fails to compile due to missing symbol. ```java package example; public class Bar { private static final Foo$ MOD = Foo$.MODULE; } ``` This is because `pre` in `javaFindMember` for `Foo` in the case above is `<root>`, not `example` and therefore `pre.findMember` looks for `<root>.Foo` instead of `example.Foo`. I'm not sure whether the qualifier is intentionally dropped. References - #12884 - scala/scala#7671 [Cherry-picked 22d98d6][modified]
Avoid skipping searchin a member by the original name even when name is likely companion module name. [Cherry-picked 4cb34e5]
Co-authored-by: Jamie Thompson <bishbashboshjt@gmail.com> [Cherry-picked 4992b4b]
 Test imported type as well as fully-qualified type to check `findRef` codepath. Co-authored-by: Jamie Thompson <bishbashboshjt@gmail.com> [Cherry-picked 96c91da]
Base automatically changed from lts-19802 to lts-3.3 July 3, 2024 08:28
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to lts-19921.

Reference

@WojciechMazur WojciechMazur merged commit 9b2cbf0 into lts-3.3 Jul 3, 2024
@WojciechMazur WojciechMazur deleted the lts-19773 branch July 3, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants