< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java

Print this page
rev 51258 : imported patch switch.diff

*** 1152,1161 **** --- 1152,1173 ---- FORLOOP, IF, RETURN, SYNCHRONIZED, SWITCH, TRY, WHILELOOP)); } } /** + * A tree scanner suitable for visiting the target-type dependent nodes nested + * within a switch expression body. + */ + static class SwitchExpressionScanner extends FilterScanner { + + SwitchExpressionScanner() { + super(EnumSet.of(BLOCK, CASE, CATCH, DOLOOP, FOREACHLOOP, + FORLOOP, IF, BREAK, SYNCHRONIZED, SWITCH, TRY, WHILELOOP)); + } + } + + /** * This visitor is used to check that structural expressions conform * to their target - this step is required as inference could end up * inferring types that make some of the nested expressions incompatible * with their corresponding instantiated target */
< prev index next >