< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java

Print this page
@@ -1691,11 +1691,11 @@
              // if at least one is sealed
              if (ts.isSealed() || ss.isSealed()) {
                  // permitted subtypes have to be disjoint with the other symbol
                  ClassSymbol sealedOne = ts.isSealed() ? ts : ss;
                  ClassSymbol other = sealedOne == ts ? ss : ts;
-                 return sealedOne.permitted.stream().allMatch(sym -> areDisjoint((ClassSymbol)sym, other));
+                 return sealedOne.getPermittedSubclasses().stream().allMatch(type -> areDisjoint((ClassSymbol)type.tsym, other));
              }
              return false;
          }
  
          private TypeRelation isCastable = new TypeRelation() {
< prev index next >