Allow open callable members in expect interfaces
#KT-42094 fixed
This commit is contained in:
committed by
Sebastian Sellmair
parent
bf0156f7c6
commit
06cb64bb51
@@ -0,0 +1,37 @@
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
// TODO: .fir.kt version is just a stub.
|
||||
|
||||
expect interface My {
|
||||
open fun bar()
|
||||
open fun bas() {}
|
||||
<!REDUNDANT_MODIFIER!>open<!> abstract fun bat(): Int
|
||||
|
||||
fun foo()
|
||||
|
||||
|
||||
open val a: Int
|
||||
open val b: String
|
||||
open val c: String get() = ""
|
||||
<!REDUNDANT_MODIFIER!>open<!> abstract val e: Int
|
||||
|
||||
val f: Int
|
||||
}
|
||||
|
||||
class MyImpl1: My
|
||||
|
||||
class MyImpl2: My {
|
||||
override fun foo() {}
|
||||
override val f = 0
|
||||
override val e = 1
|
||||
}
|
||||
|
||||
expect interface Outer {
|
||||
interface Inner {
|
||||
open fun bar()
|
||||
open fun bas() {}
|
||||
<!REDUNDANT_MODIFIER!>open<!> abstract fun bat(): Int
|
||||
fun foo()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user