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

Support Java 9+ Language Features #53

Closed
paulirwin opened this issue Aug 9, 2023 · 3 comments
Closed

Support Java 9+ Language Features #53

paulirwin opened this issue Aug 9, 2023 · 3 comments
Milestone

Comments

@paulirwin
Copy link
Owner

paulirwin commented Aug 9, 2023

Would like to have unit tests for all. Only tracking non-preview features for now; please file separate issues for preview features for consideration. This issue might get broken out into several.

Java 9:

Java 10:

Java 11:

Java 12:

(no non-preview features)

Java 13:

(no non-preview features)

Java 14:

Java 15:

Java 16:

Java 17:

Java 18:

(no non-preview features)

Java 19:

(no non-preview features)

Java 20:

(no non-preview features)

Java 21:

paulirwin added a commit that referenced this issue Aug 10, 2023
It turns out we somehow missed try-with-resources Java 7 support, and no
one has complained yet. This adds support for the Java 7 case, as well
as the Java 9 more concise syntax if the `try` is initialized with a
name expression resource instead of a variable declaration.
paulirwin added a commit that referenced this issue Aug 12, 2023
* Add test for Java 9 diamond operator in inner class

* Tests: Make Java 9 diamond operator example just a conversion test, #53
paulirwin added a commit that referenced this issue Aug 12, 2023
This adds a new xUnit Theory for tests that are expected to fail
parsing.
paulirwin added a commit that referenced this issue Aug 12, 2023
This adds a new xUnit Theory for tests that are expected to fail
parsing.
paulirwin added a commit that referenced this issue Aug 12, 2023
This converts interface methods with a body, such as default and private
interface methods, to C# 8 interface methods with bodies.

Also, this cleans up some use of modifier keyword determination that was
messy as a reult of the JavaParser upgrade.
paulirwin added a commit that referenced this issue Aug 12, 2023
#60)

This converts interface methods with a body, such as default and private
interface methods, to C# 8 interface methods with bodies.

Also, this cleans up some use of modifier keyword determination that was
messy as a reult of the JavaParser upgrade.
@paulirwin
Copy link
Owner Author

Java 9 support should be complete, and then I should be able to get through Java 11 (and thus Java 13) pretty quickly. Switch expressions might be a little more involved.

paulirwin added a commit that referenced this issue Aug 12, 2023
This was already accidentally supported, but now we're making our support
for type inference explicit and under test.
paulirwin added a commit that referenced this issue Aug 12, 2023
This was already accidentally supported, but now we're making our support
for type inference explicit and under test.
paulirwin added a commit that referenced this issue Aug 12, 2023
Just like regular type inference for Java 10, we already accidentally
supported this since `var` is the same in both languages. In this case,
we cannot make this a full integration test due to some issues noted in
the test file comments.
@paulirwin
Copy link
Owner Author

Java 10 and 11 type inference was already implicitly/accidentally supported, but added tests for those. We can now say that, bugs notwithstanding, we should have support for converting up to Java 13 code, including Java 11 LTS. I will break the other features out as separate standalone issues since they are larger.

@paulirwin
Copy link
Owner Author

Separate issues created for Java 14-21 features.

paulirwin added a commit that referenced this issue Aug 12, 2023
#62)

Just like regular type inference for Java 10, we already accidentally
supported this since `var` is the same in both languages. In this case,
we cannot make this a full integration test due to some issues noted in
the test file comments.
@paulirwin paulirwin added this to the v3.0 milestone Aug 14, 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

No branches or pull requests

1 participant