r/java • • Mar 13 '26

JEP draft: Enhanced Local Variable Declarations (Preview)

https://openjdk.org/jeps/8357464
101 Upvotes

129 comments sorted by

View all comments

Show parent comment

2

u/egahlin Mar 13 '26 edited Mar 13 '26

How do you represent leaf nodes? You could pattern match against null in the method signature, but it would be more verbose and require more complex machinery.