RFR: JDK-8231826: Implement javac changes for pattern matching for instanceof

Jan Lahoda jan.lahoda at oracle.com
Thu Oct 10 12:12:59 UTC 2019


As part of the effort to prepare JEP 305: Pattern Matching for 
instanceof (Preview) for Propose to Target, I would like to ask for a 
code review for the corresponding javac changes.

The webrev is here:

The patch applies on top of:

The current spec the patch is striving to implements is here:

As far as I know, there is one (significant) open issue in the spec, and 
that is whether non-reifiable types should be allowed in "instanceof 
<type-test-pattern>". Currently (AFAIK), the spec does not allow 
non-reifiable types in the type test pattern in instanceof, and the 
javac implementation should be consistent with the spec. Should the spec 
change, the corresponding update to the javac code should have a very 
limited impact.

I'll be preparing a CSR for this change in the coming days.

The JBS issue for this code change is:

Any feedback is welcome!


More information about the compiler-dev mailing list