src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java
changeset 55306 ea43db53de91
parent 51827 07179f7db03d
child 59285 7799a51dbe30
equal deleted inserted replaced
55305:6e432194ee97 55306:ea43db53de91
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   618         result = tree;
   618         result = tree;
   619     }
   619     }
   620 
   620 
   621     @Override
   621     @Override
   622     public void visitBreak(JCBreak tree) {
   622     public void visitBreak(JCBreak tree) {
   623         if (tree.isValueBreak()) {
   623         result = tree;
   624             tree.value = translate(tree.value, erasure(tree.value.type));
   624     }
   625             tree.value.type = erasure(tree.value.type);
   625 
   626             tree.value = retype(tree.value, tree.value.type, pt);
   626     @Override
   627         }
   627     public void visitYield(JCYield tree) {
       
   628         tree.value = translate(tree.value, erasure(tree.value.type));
       
   629         tree.value.type = erasure(tree.value.type);
       
   630         tree.value = retype(tree.value, tree.value.type, pt);
   628         result = tree;
   631         result = tree;
   629     }
   632     }
   630 
   633 
   631     public void visitThrow(JCThrow tree) {
   634     public void visitThrow(JCThrow tree) {
   632         tree.expr = translate(tree.expr, erasure(tree.expr.type));
   635         tree.expr = translate(tree.expr, erasure(tree.expr.type));