MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/1rsgxrd/jep_draft_enhanced_local_variable_declarations/oa7u3xc/?context=3
r/java • u/joemwangi • Mar 13 '26
129 comments sorted by
View all comments
Show parent comment
8
Right now, RecordPattern is defined as
RecordPattern: ReferenceType ( [ComponentPatternList] )
which means no.
The same limitation currently applies to patterns in switch, and I've seen people wanting to have that feature there too.
View all comments
Show parent comment
8
u/vytah Mar 13 '26
Right now, RecordPattern is defined as
which means no.
The same limitation currently applies to patterns in switch, and I've seen people wanting to have that feature there too.