src/share/classes/com/sun/tools/javac/comp/Attr.java
Print this page
@@ -1110,11 +1110,11 @@
Env<AttrContext> catchEnv =
localEnv.dup(c, localEnv.info.dup(localEnv.info.scope.dup()));
Type ctype = attribStat(c.param, catchEnv);
if (TreeInfo.isMultiCatch(c)) {
//multi-catch parameter is implicitly marked as final
- c.param.sym.flags_field |= FINAL | DISJUNCTION;
+ c.param.sym.flags_field |= FINAL | UNION;
}
if (c.param.sym.kind == Kinds.VAR) {
c.param.sym.setData(ElementKind.EXCEPTION_PARAMETER);
}
chk.checkType(c.param.vartype.pos(),
@@ -2905,19 +2905,19 @@
}
}
result = check(tree, owntype, TYP, pkind, pt);
}
- public void visitTypeDisjunction(JCTypeDisjunction tree) {
+ public void visitTypeUnion(JCTypeUnion tree) {
ListBuffer<Type> multicatchTypes = ListBuffer.lb();
for (JCExpression typeTree : tree.alternatives) {
Type ctype = attribType(typeTree, env);
ctype = chk.checkType(typeTree.pos(),
chk.checkClassType(typeTree.pos(), ctype),
syms.throwableType);
if (!ctype.isErroneous()) {
- //check that alternatives of a disjunctive type are pairwise
+ //check that alternatives of a union type are pairwise
//unrelated w.r.t. subtyping
if (chk.intersects(ctype, multicatchTypes.toList())) {
for (Type t : multicatchTypes) {
boolean sub = types.isSubtype(ctype, t);
boolean sup = types.isSubtype(t, ctype);