mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-12 06:29:37 +00:00
7030476: Fix conflicting use of JCTree/JCExpression
Reviewed-by: mcimadamore
This commit is contained in:
parent
b4854e299c
commit
fb25dcbb05
@ -2002,7 +2002,7 @@ public class Lower extends TreeTranslator {
|
||||
JCStatement rethrow;
|
||||
if (target.hasInitCause()) {
|
||||
// rethrow = "throw new NoClassDefFoundError().initCause(e);
|
||||
JCTree throwExpr =
|
||||
JCExpression throwExpr =
|
||||
makeCall(makeNewClass(syms.noClassDefFoundErrorType,
|
||||
List.<JCExpression>nil()),
|
||||
names.initCause,
|
||||
|
||||
@ -700,7 +700,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
|
||||
public List<JCTypeParameter> getTypeParameters() {
|
||||
return typarams;
|
||||
}
|
||||
public JCTree getExtendsClause() { return extending; }
|
||||
public JCExpression getExtendsClause() { return extending; }
|
||||
public List<JCExpression> getImplementsClause() {
|
||||
return implementing;
|
||||
}
|
||||
@ -1175,7 +1175,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
|
||||
return v.visitTry(this, d);
|
||||
}
|
||||
@Override
|
||||
public List<? extends JCTree> getResources() {
|
||||
public List<JCTree> getResources() {
|
||||
return resources;
|
||||
}
|
||||
@Override
|
||||
@ -1392,8 +1392,8 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
|
||||
*/
|
||||
public static class JCThrow extends JCStatement implements ThrowTree {
|
||||
public JCExpression expr;
|
||||
protected JCThrow(JCTree expr) {
|
||||
this.expr = (JCExpression)expr;
|
||||
protected JCThrow(JCExpression expr) {
|
||||
this.expr = expr;
|
||||
}
|
||||
@Override
|
||||
public void accept(Visitor v) { v.visitThrow(this); }
|
||||
@ -2466,7 +2466,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
|
||||
JCBreak Break(Name label);
|
||||
JCContinue Continue(Name label);
|
||||
JCReturn Return(JCExpression expr);
|
||||
JCThrow Throw(JCTree expr);
|
||||
JCThrow Throw(JCExpression expr);
|
||||
JCAssert Assert(JCExpression cond, JCExpression detail);
|
||||
JCMethodInvocation Apply(List<JCExpression> typeargs,
|
||||
JCExpression fn,
|
||||
|
||||
@ -340,7 +340,7 @@ public class TreeCopier<P> implements TreeVisitor<JCTree,P> {
|
||||
|
||||
public JCTree visitThrow(ThrowTree node, P p) {
|
||||
JCThrow t = (JCThrow) node;
|
||||
JCTree expr = copy(t.expr, p);
|
||||
JCExpression expr = copy(t.expr, p);
|
||||
return M.at(t.pos).Throw(expr);
|
||||
}
|
||||
|
||||
|
||||
@ -332,7 +332,7 @@ public class TreeMaker implements JCTree.Factory {
|
||||
return tree;
|
||||
}
|
||||
|
||||
public JCThrow Throw(JCTree expr) {
|
||||
public JCThrow Throw(JCExpression expr) {
|
||||
JCThrow tree = new JCThrow(expr);
|
||||
tree.pos = pos;
|
||||
return tree;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user