[AA] Add tests for getSealedInheritors
- Previously, the sealed inheritors provider was only tested indirectly through diagnostics tests on `when` expressions. ^KT-66013
This commit is contained in:
committed by
Space Team
parent
1374bc8e2d
commit
5c8c3020c6
+11
@@ -0,0 +1,11 @@
|
||||
// MODULE: dependency
|
||||
// FILE: MySealedClass.kt
|
||||
sealed class MySealedClass
|
||||
|
||||
class OneSealedChild : MySealedClass()
|
||||
class TwoSealedChild : MySealedClass()
|
||||
|
||||
// MODULE: main(dependency)
|
||||
// FILE: main.kt
|
||||
|
||||
// class: MySealedClass
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
/OneSealedChild
|
||||
class OneSealedChild : MySealedClass()
|
||||
|
||||
/TwoSealedChild
|
||||
class TwoSealedChild : MySealedClass()
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// MODULE: lib
|
||||
// MODULE_KIND: LibraryBinary
|
||||
// FILE: MySealedClass.kt
|
||||
sealed class MySealedClass
|
||||
|
||||
class OneSealedChild : MySealedClass()
|
||||
class TwoSealedChild : MySealedClass()
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
|
||||
// class: MySealedClass
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
/OneSealedChild
|
||||
class OneSealedChild : MySealedClass()
|
||||
|
||||
/TwoSealedChild
|
||||
class TwoSealedChild : MySealedClass()
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
sealed class MySealedClass
|
||||
|
||||
class OneSealedChild : MySealedClass()
|
||||
class TwoSealedChild : MySealedClass()
|
||||
|
||||
// class: MySealedClass
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
/OneSealedChild
|
||||
class OneSealedChild : MySealedClass()
|
||||
|
||||
/TwoSealedChild
|
||||
class TwoSealedChild : MySealedClass()
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// MODULE: dependency
|
||||
// FILE: MySealedInterface.kt
|
||||
sealed interface MySealedInterface
|
||||
|
||||
class OneSealedChild : MySealedInterface
|
||||
class TwoSealedChild : MySealedInterface
|
||||
|
||||
// MODULE: main(dependency)
|
||||
// FILE: main.kt
|
||||
|
||||
// class: MySealedInterface
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
/OneSealedChild
|
||||
class OneSealedChild : MySealedInterface
|
||||
|
||||
/TwoSealedChild
|
||||
class TwoSealedChild : MySealedInterface
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// MODULE: lib
|
||||
// MODULE_KIND: LibraryBinary
|
||||
// FILE: MySealedInterface.kt
|
||||
sealed interface MySealedInterface
|
||||
|
||||
class OneSealedChild : MySealedInterface
|
||||
class TwoSealedChild : MySealedInterface
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: main.kt
|
||||
|
||||
// class: MySealedInterface
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
/OneSealedChild
|
||||
class OneSealedChild : MySealedInterface
|
||||
|
||||
/TwoSealedChild
|
||||
class TwoSealedChild : MySealedInterface
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
sealed interface MySealedInterface
|
||||
|
||||
class OneSealedChild : MySealedInterface
|
||||
class TwoSealedChild : MySealedInterface
|
||||
|
||||
// class: MySealedInterface
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
/OneSealedChild
|
||||
class OneSealedChild : MySealedInterface
|
||||
|
||||
/TwoSealedChild
|
||||
class TwoSealedChild : MySealedInterface
|
||||
Reference in New Issue
Block a user