Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8319987

compilation of sealed classes leads to infinite recursion

XMLWordPrintable

    • b25
    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      openjdk 22-internal 2024-03-19
      OpenJDK Runtime Environment (build 22-internal-adhoc.jialelt2.openjdksrc)
      OpenJDK 64-Bit Server VM (build 22-internal-adhoc.jialelt2.openjdksrc, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      Compilation of invalid sealed interface leads to infinite recursion and Javac crashing

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile the below source code using OpenJDK 22

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Compilation should fail with errors displayed. Here is the result from JavaC 11

      SealedClassSample.java:8: error: <identifier> expected
      public sealed interface Action permits Add, Subtract, Multiply, Divide {
      ^
      SealedClassSample.java:8: error: '{' expected
      public sealed interface Action permits Add, Subtract, Multiply, Divide {
      ^
      SealedClassSample.java:20: error: <identifier> expected
      private static sealed interface MathOp permits Add, Subtract, Multiply, Divide {
      ^
      SealedClassSample.java:20: error: '{' expected
      private static sealed interface MathOp permits Add, Subtract, Multiply, Divide {
      ^
      SealedClassSample.java:25: error: <identifier> expected
      private sealed static class Add implements MathOp permits Add {
      ^
      SealedClassSample.java:25: error: '{' expected
      private sealed static class Add implements MathOp permits Add {
      ^
      6 errors
      ACTUAL -
      The system is out of resources.
      Consult the following stack trace for details.
      java.lang.StackOverflowError
      at jdk.compiler/com.sun.tools.javac.code.Types$12.visitClassType(Types.java:2173)
      at jdk.compiler/com.sun.tools.javac.code.Types$12.visitClassType(Types.java:2159)
      at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.accept(Type.java:1050)
      at jdk.compiler/com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4894)
      at jdk.compiler/com.sun.tools.javac.code.Types.asSuper(Types.java:2156)
      at jdk.compiler/com.sun.tools.javac.code.Types$4.visitClassType(Types.java:1186)
      at jdk.compiler/com.sun.tools.javac.code.Types$4.visitClassType(Types.java:1107)
      at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.accept(Type.java:1050)
      at jdk.compiler/com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4894)
      at jdk.compiler/com.sun.tools.javac.code.Types.isSubtype(Types.java:1103)
      at jdk.compiler/com.sun.tools.javac.code.Types.isSubtype(Types.java:1074)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1674)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)
      at jdk.compiler/com.sun.tools.javac.code.Types.lambda$areDisjoint$1(Types.java:1696)
      at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
      at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1950)
      at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
      at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
      at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637)
      at jdk.compiler/com.sun.tools.javac.code.Types.areDisjoint(Types.java:1696)

      ---------- BEGIN SOURCE ----------
      public class SealedClassSample extends Object implements Comparable<SealedClassSample>{
      public sealed interface Action permits Add, Subtract, Multiply, Divide {
      abstract Number calculate(Number op1, Number op2);
      public default String toPrintableString() {
      StringBuilder sb = new StringBuilder(this.getClass().getSimpleName());
      if (this instanceof Add) {
      sb.append(" +");
      } else if (this instanceof Subtract) {
      sb.append(" -");
      }
      return sb.toString();
      }
      }
      private static sealed interface MathOp permits Add, Subtract, Multiply, Divide {

      Number applyMath(Number op1, Number op2);

      }
      private sealed static class Add implements MathOp permits Add {

      Number applyMath(Number op1, Number op2) {
      return op1.doubleValue() + op2.doubleValue();
      }

      }
      public void mathOps() {
      System.out.println(Add.class);
      }
      }
      ---------- END SOURCE ----------

            vromero Vicente Arturo Romero Zaldivar
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: