src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 59021 cfc7bb9a5a92
parent 58906 d58a21542c04
child 59285 7799a51dbe30
equal deleted inserted replaced
59020:aebd72de84b0 59021:cfc7bb9a5a92
  1465 
  1465 
  1466             // Attribute all cases and
  1466             // Attribute all cases and
  1467             // check that there are no duplicate case labels or default clauses.
  1467             // check that there are no duplicate case labels or default clauses.
  1468             Set<Object> labels = new HashSet<>(); // The set of case labels.
  1468             Set<Object> labels = new HashSet<>(); // The set of case labels.
  1469             boolean hasDefault = false;      // Is there a default label?
  1469             boolean hasDefault = false;      // Is there a default label?
  1470             @SuppressWarnings("preview")
       
  1471             CaseTree.CaseKind caseKind = null;
  1470             CaseTree.CaseKind caseKind = null;
  1472             boolean wasError = false;
  1471             boolean wasError = false;
  1473             for (List<JCCase> l = cases; l.nonEmpty(); l = l.tail) {
  1472             for (List<JCCase> l = cases; l.nonEmpty(); l = l.tail) {
  1474                 JCCase c = l.head;
  1473                 JCCase c = l.head;
  1475                 if (caseKind == null) {
  1474                 if (caseKind == null) {