[FIR] Allow actualization of expect classes by classes with wider visibility
^KT-59355 Fixed
This commit is contained in:
committed by
Space Team
parent
583aad2350
commit
d972b78627
+34
@@ -0,0 +1,34 @@
|
||||
// ISSUE: KT-59355
|
||||
|
||||
// MODULE: common
|
||||
internal expect open class Some {
|
||||
protected class ProtectedNested
|
||||
internal class InternalNested
|
||||
|
||||
public fun publicFun()
|
||||
internal fun internalFun()
|
||||
protected fun protectedFun()
|
||||
}
|
||||
|
||||
internal expect open class Other {
|
||||
protected class ProtectedNested
|
||||
internal class InternalNested
|
||||
}
|
||||
|
||||
// MODULE: platform-jvm()()(common)
|
||||
public actual open class Some { // should be allowed
|
||||
public class ProtectedNested // should be allowed
|
||||
public class InternalNested // should be allowed
|
||||
|
||||
public actual fun publicFun() {} // should be allowed
|
||||
public actual fun internalFun() {} // should be allowed
|
||||
public actual fun protectedFun() {} // should be allowed
|
||||
}
|
||||
|
||||
public open class PlatformOther { // should be allowed
|
||||
public class ProtectedNested // should be allowed
|
||||
public class InternalNested // should be allowed
|
||||
}
|
||||
|
||||
internal actual typealias Other = PlatformOther // should be allowed
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
// ISSUE: KT-59355
|
||||
|
||||
// MODULE: common
|
||||
internal expect open class <!NO_ACTUAL_FOR_EXPECT!>Some<!> {
|
||||
protected class ProtectedNested
|
||||
internal class InternalNested
|
||||
|
||||
public fun publicFun()
|
||||
internal fun internalFun()
|
||||
protected fun protectedFun()
|
||||
}
|
||||
|
||||
internal expect open class <!NO_ACTUAL_FOR_EXPECT!>Other<!> {
|
||||
protected class ProtectedNested
|
||||
internal class InternalNested
|
||||
}
|
||||
|
||||
// MODULE: platform-jvm()()(common)
|
||||
<!ACTUAL_WITHOUT_EXPECT!>public<!> actual open class Some { // should be allowed
|
||||
<!ACTUAL_WITHOUT_EXPECT!>public<!> class <!ACTUAL_MISSING!>ProtectedNested<!> // should be allowed
|
||||
<!ACTUAL_WITHOUT_EXPECT!>public<!> class <!ACTUAL_MISSING!>InternalNested<!> // should be allowed
|
||||
|
||||
public actual fun publicFun() {} // should be allowed
|
||||
public actual fun internalFun() {} // should be allowed
|
||||
public actual fun protectedFun() {} // should be allowed
|
||||
}
|
||||
|
||||
public open class PlatformOther { // should be allowed
|
||||
public class ProtectedNested // should be allowed
|
||||
public class InternalNested // should be allowed
|
||||
}
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>internal<!> actual typealias Other = PlatformOther // should be allowed
|
||||
|
||||
Reference in New Issue
Block a user