Respect explicit api mode state when generating actual declarations

#KT-44067 Fixed
This commit is contained in:
Leonid Startsev
2021-04-28 01:48:11 +03:00
committed by Space
parent 8cd704b6db
commit 796d2fd210
11 changed files with 113 additions and 7 deletions
@@ -0,0 +1,16 @@
// "Create actual class for module testModule_JVM (JVM)" "true"
// COMPILER_ARGUMENTS: -Xexplicit-api=strict
public expect class <caret>My {
public fun foo(param: String): Int
public fun String.bar(y: Double): Boolean
public fun baz(): Unit
public constructor(flag: Boolean)
public val isGood: Boolean
public var status: Int
}
@@ -0,0 +1,16 @@
// "Create actual class for module testModule_JVM (JVM)" "true"
// COMPILER_ARGUMENTS: -Xexplicit-api=strict
public expect class My {
public fun foo(param: String): Int
public fun String.bar(y: Double): Boolean
public fun baz(): Unit
public constructor(flag: Boolean)
public val isGood: Boolean
public var status: Int
}
@@ -0,0 +1 @@
// My: to be implemented
@@ -0,0 +1,24 @@
// My: to be implemented
public actual class My {
public actual fun foo(param: String): Int {
TODO("Not yet implemented")
}
public actual fun String.bar(y: Double): Boolean {
TODO("Not yet implemented")
}
public actual fun baz() {
}
public actual constructor(flag: Boolean) {
TODO("Not yet implemented")
}
public actual val isGood: Boolean
get() = TODO("Not yet implemented")
public actual var status: Int
get() = TODO("Not yet implemented")
set(value) {}
}
@@ -0,0 +1,4 @@
// "Create actual function for module testModule_JVM (JVM)" "true"
// COMPILER_ARGUMENTS: -Xexplicit-api=strict
public expect fun <caret>foo(arg: Int): String
@@ -0,0 +1,4 @@
// "Create actual function for module testModule_JVM (JVM)" "true"
// COMPILER_ARGUMENTS: -Xexplicit-api=strict
public expect fun foo(arg: Int): String
@@ -0,0 +1 @@
// foo: to be implemented
@@ -0,0 +1,4 @@
// foo: to be implemented
public actual fun foo(arg: Int): String {
TODO("Not yet implemented")
}