Skip to content
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

Allow concrete private interface methods in Java sources #9748

Merged
merged 1 commit into from Sep 8, 2021

Conversation

dengziming
Copy link

@dengziming dengziming commented Sep 2, 2021

Java 9+ allows concrete private interface methods. This PR makes scalac's Java parser accept them.

fixes scala/bug#12393

@scala-jenkins scala-jenkins added this to the 2.13.7 milestone Sep 2, 2021
@SethTisue
Copy link
Member

changing isConcreteInterfaceMethod affects isBodyOk, which is the desired effect

but then isConcreteInterfaceMethod is used again later, as follows:

          // for abstract methods (of classes), the `DEFERRED` flag is already set.
          // here we also set it for interface methods that are not static and not default.
          if (!isConcreteInterfaceMethod) mods1 |= Flags.DEFERRED

is the change you have made correct for this use of isConcreteInterfaceMethod as well?

@SethTisue SethTisue changed the title ISSUE-12393: Parse concrete private interface methods in Java Parse concrete private interface methods in Java Sep 7, 2021
@SethTisue SethTisue changed the title Parse concrete private interface methods in Java Allow concrete private interface methods in Java sources Sep 7, 2021
@lrytz
Copy link
Member

lrytz commented Sep 8, 2021

is the change you have made correct for this use of isConcreteInterfaceMethod as well?

Seems correct

@lrytz lrytz merged commit d2275f8 into scala:2.13.x Sep 8, 2021
@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java interop release-notes worth highlighting in next release notes
Projects
None yet
4 participants