[AA] Add sealed inheritors tests for inheritors with the wrong package
- Inheriting from a sealed class in the wrong package is illegal, so a library test makes no sense here, as the test infrastructure wouldn't be able to compile the library. ^KT-66013
This commit is contained in:
committed by
Space Team
parent
ed62211e06
commit
2e00879fe1
+19
@@ -0,0 +1,19 @@
|
||||
// MODULE: dependency
|
||||
// FILE: MySealedClass.kt
|
||||
package foo.bar
|
||||
|
||||
sealed class MySealedClass
|
||||
|
||||
class Inheritor1 : MySealedClass()
|
||||
|
||||
// FILE: Inheritor2.kt
|
||||
package foo
|
||||
|
||||
import foo.bar.MySealedClass
|
||||
|
||||
class Inheritor2 : MySealedClass()
|
||||
|
||||
// MODULE: main(dependency)
|
||||
// FILE: main.kt
|
||||
|
||||
// class: foo/bar/MySealedClass
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
foo/bar/Inheritor1
|
||||
class Inheritor1 : foo.bar.MySealedClass()
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// FILE: main.kt
|
||||
package foo.bar
|
||||
|
||||
sealed class MySealedClass
|
||||
|
||||
class Inheritor1 : MySealedClass()
|
||||
|
||||
// FILE: Inheritor2.kt
|
||||
package foo
|
||||
|
||||
import foo.bar.MySealedClass
|
||||
|
||||
class Inheritor2 : MySealedClass()
|
||||
|
||||
// class: foo/bar/MySealedClass
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
foo/bar/Inheritor1
|
||||
class Inheritor1 : foo.bar.MySealedClass()
|
||||
Reference in New Issue
Block a user