Allow sealed inheritors for expect sealed classes in MPP submodules
KT-45842 Fixed KTIJ-7068
This commit is contained in:
committed by
TeamCityServer
parent
1633190478
commit
fe81078366
+16
@@ -0,0 +1,16 @@
|
||||
package foo
|
||||
|
||||
/*
|
||||
* - Sealed1 [common], actualized in [main]
|
||||
* - Sealed2 [common], actualized in [intermediate]
|
||||
* - Derived11 [common]
|
||||
* - Derived12 [intermediate]
|
||||
* - Derived1 [common]
|
||||
* - Derived2 [intermediate]
|
||||
* - Derived3 [main]
|
||||
*/
|
||||
expect sealed class <!LINE_MARKER("descr='Has subclasses'")!>Sealed1<!>()
|
||||
expect sealed class <!LINE_MARKER("descr='Is subclassed by Derived11 Derived12 Derived13Error'"), LINE_MARKER("descr='Has actuals in JVM'")!>Sealed2<!>() : Sealed1
|
||||
|
||||
class Derived1 : Sealed1()
|
||||
class Derived11 : Sealed2()
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
MODULE common { platform=[JVM, JS, Native]; root=common }
|
||||
MODULE intermediate { platform=[JVM]; root=intermediate }
|
||||
MODULE main { platform=[JVM]; root=main }
|
||||
MODULE real-main { platform=[JVM]; root=real-main }
|
||||
|
||||
intermediate -> common { kind=DEPENDS_ON }
|
||||
main -> intermediate { kind=DEPENDS_ON }
|
||||
real-main -> main { kind=DEPENDS_ON }
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
package foo
|
||||
|
||||
actual sealed class <!LINE_MARKER("descr='Is subclassed by Derived12 Derived13Error'"), LINE_MARKER("descr='Has declaration in common module'")!>Sealed2<!> : Sealed1()
|
||||
|
||||
class Derived2 : Sealed1()
|
||||
class Derived12 : Sealed2()
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package foo
|
||||
|
||||
actual sealed class <!LINE_MARKER("descr='Is subclassed by Derived2 Derived3Error'")!>Sealed1<!> actual constructor()
|
||||
|
||||
class Derived2 : Sealed1()
|
||||
class Derived13Error : <!SEALED_INHERITOR_IN_DIFFERENT_MODULE!>Sealed2<!>() // should be an error
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
class Derived3Error : <!SEALED_INHERITOR_IN_DIFFERENT_MODULE!>Sealed1<!>() // should be an error
|
||||
Reference in New Issue
Block a user