Add support for Java 9 String concatenation #558
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for Java 9 String concatenation by rewriting its
invokedynamic
instructions to StringBuilder appends.This makes it possible to compile your Java 9+ code with RoboVM. New language features like
private/static/default interface methods [Java 9]
,local-variable type inference (the var keyword) [Java 10]
,switch expressions [Java 14]
ortext blocks [Java 15]
will work now.Caution when using Java 11+: Nested classes are handled differently from now on. Previously you have been able to access private methods/fields of nested classes in the outer class and vice versa, however this will now result in an
IllegalAccessError
.