src/share/classes/com/sun/tools/javac/comp/Attr.java

changeset 969
8cc5b440fdde
parent 954
b945b846c979
child 972
694ff82ca68e
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Apr 04 19:36:26 2011 +0100
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Wed Apr 06 19:30:57 2011 -0700
     1.3 @@ -1112,7 +1112,7 @@
     1.4              Type ctype = attribStat(c.param, catchEnv);
     1.5              if (TreeInfo.isMultiCatch(c)) {
     1.6                  //multi-catch parameter is implicitly marked as final
     1.7 -                c.param.sym.flags_field |= FINAL | DISJUNCTION;
     1.8 +                c.param.sym.flags_field |= FINAL | UNION;
     1.9              }
    1.10              if (c.param.sym.kind == Kinds.VAR) {
    1.11                  c.param.sym.setData(ElementKind.EXCEPTION_PARAMETER);
    1.12 @@ -2908,7 +2908,7 @@
    1.13          result = check(tree, owntype, TYP, pkind, pt);
    1.14      }
    1.15  
    1.16 -    public void visitTypeDisjunction(JCTypeDisjunction tree) {
    1.17 +    public void visitTypeUnion(JCTypeUnion tree) {
    1.18          ListBuffer<Type> multicatchTypes = ListBuffer.lb();
    1.19          for (JCExpression typeTree : tree.alternatives) {
    1.20              Type ctype = attribType(typeTree, env);
    1.21 @@ -2916,7 +2916,7 @@
    1.22                            chk.checkClassType(typeTree.pos(), ctype),
    1.23                            syms.throwableType);
    1.24              if (!ctype.isErroneous()) {
    1.25 -                //check that alternatives of a disjunctive type are pairwise
    1.26 +                //check that alternatives of a union type are pairwise
    1.27                  //unrelated w.r.t. subtyping
    1.28                  if (chk.intersects(ctype,  multicatchTypes.toList())) {
    1.29                      for (Type t : multicatchTypes) {

mercurial