< prev index next >

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

Print this page

        

@@ -565,10 +565,17 @@
         tree.pats = translate(tree.pats, null);
         tree.stats = translate(tree.stats);
         result = tree;
     }
 
+    public void visitBindingPattern(JCBindingPattern tree) {
+        if (tree.vartype != null) {
+            tree.vartype = translate(tree.vartype, null);
+        }
+        result = tree;
+    }
+
     public void visitSwitchExpression(JCSwitchExpression tree) {
         Type selsuper = types.supertype(tree.selector.type);
         boolean enumSwitch = selsuper != null &&
             selsuper.tsym == syms.enumSym;
         Type target = enumSwitch ? erasure(tree.selector.type) : syms.intType;

@@ -778,11 +785,11 @@
         result = retype(tree, tree.type, pt);
     }
 
     public void visitTypeTest(JCInstanceOf tree) {
         tree.expr = translate(tree.expr, null);
-        tree.clazz = translate(tree.clazz, null);
+        tree.pattern = translate(tree.pattern, null);
         result = tree;
     }
 
     public void visitIndexed(JCArrayAccess tree) {
         tree.indexed = translate(tree.indexed, erasure(tree.indexed.type));
< prev index next >