ExtendSealedClassFix: fix added (IDEA-249603)

GitOrigin-RevId: d47a517c15f0a011fae581db7aacf4b1a76bad1b
This commit is contained in:
Artemiy Sartakov
2020-09-10 09:55:47 +00:00
committed by intellij-monorepo-bot
parent 723404adf8
commit 859a8fa5ba
25 changed files with 415 additions and 107 deletions
@@ -0,0 +1,4 @@
// "Implement 'Parent'" "true"
sealed interface Parent permits MyEnum {}
enum MyEnum implements Parent {}
@@ -0,0 +1,4 @@
// "Extend 'Parent'" "true"
sealed class Parent permits Child {}
final class Child extends Parent {}
@@ -0,0 +1,4 @@
// "Implement 'Parent'" "true"
sealed interface Parent permits User {}
record User(int age) implements Parent {}
@@ -0,0 +1,4 @@
// "final" "true"
sealed class Parent permits Child {}
final class Child extends Parent {}
@@ -0,0 +1,8 @@
// "non-sealed" "true"
sealed interface Parent permits Child, Foo {}
interface OtherParent {}
non-sealed interface Foo extends Parent {}
non-sealed interface Child extends OtherParent, Parent {}
@@ -0,0 +1,4 @@
// "final" "true"
sealed class Parent permits Child {}
final class Child extends Parent {}
@@ -0,0 +1,4 @@
// "Implement 'Parent'" "true"
sealed interface Parent permits MyEnum<caret> {}
enum MyEnum {}
@@ -0,0 +1,4 @@
// "Extend 'Parent'" "true"
sealed class Parent permits C<caret>hild {}
final class Child {}
@@ -0,0 +1,4 @@
// "final" "false"
sealed interface Parent permits C<caret>hild {}
interface Child {}
@@ -0,0 +1,4 @@
// "Implement 'Parent'" "true"
sealed interface Parent permits User<caret> {}
record User(int age) {}
@@ -0,0 +1,4 @@
// "final" "true"
sealed class Parent permits C<caret>hild {}
class Child {}
@@ -0,0 +1,8 @@
// "non-sealed" "true"
sealed interface Parent permits Child<caret>, Foo {}
interface OtherParent {}
non-sealed interface Foo extends Parent {}
interface Child extends OtherParent {}
@@ -0,0 +1,6 @@
// "final" "false"
sealed class Parent permits C<caret>hild {}
class OtherParent {}
class Child extends OtherParent {}
@@ -0,0 +1,4 @@
// "final" "true"
sealed class Parent permits C<caret>hild {}
class Child extends Object {}