Skip to content

Fix #12249: don't export java defined modules #12516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2021

Conversation

OlivierBlanvillain
Copy link
Contributor

No description provided.

@OlivierBlanvillain OlivierBlanvillain changed the title Fix 12249: don't export java defined methods Fix #12249: don't export java defined methods May 18, 2021
@@ -1000,6 +1000,8 @@ class Namer { typer: Typer =>
) match
case Some(other) => No(i"overrides ${other.showLocated}, which is already a member of $cls")
case None => Yes
else if sym.is(JavaDefined) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue comes from trying to export a Java class because we're missing code for exporting the static methods of the class but we shouldn't prevent exporting a Java method

@@ -1000,6 +1000,8 @@ class Namer { typer: Typer =>
) match
case Some(other) => No(i"overrides ${other.showLocated}, which is already a member of $cls")
case None => Yes
else if sym.is(JavaDefined) && sym.is(Module) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else if sym.is(JavaDefined) && sym.is(Module) then
else if sym.is(JavaModule) then

@OlivierBlanvillain OlivierBlanvillain changed the title Fix #12249: don't export java defined methods Fix #12249: don't export java defined modules May 19, 2021
@OlivierBlanvillain OlivierBlanvillain merged commit d26549d into scala:master May 19, 2021
@OlivierBlanvillain OlivierBlanvillain deleted the fix-12249 branch May 19, 2021 15:30
@Kordyjan Kordyjan added this to the 3.0.1 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants