Support OptionalExpectation in serializer (#2048)
* [serializer] Support OptionalExpectation * Fix OptionalExectation test for Windows * [tests] Don't print compiler args by default
This commit is contained in:
@@ -2317,7 +2317,7 @@ task mpp_optional_expectation(type: RunStandaloneKonanTest) {
|
||||
def outputRoot = project.ext."$outputSourceSetName"
|
||||
flags = [
|
||||
'-Xmulti-platform',
|
||||
"-Xcommon-sources=${file("$outputRoot/$name/mpp_optional_expectation.kt")}"
|
||||
"-Xcommon-sources=$outputRoot/$name/mpp_optional_expectation.kt"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
@file:Suppress("EXPERIMENTAL_API_USAGE_ERROR")
|
||||
|
||||
import kotlin.js.*
|
||||
|
||||
@OptionalExpectation
|
||||
expect annotation class Optional()
|
||||
|
||||
@Optional
|
||||
fun foo() { println(42) }
|
||||
|
||||
@JsName("jsBar")
|
||||
fun bar() { println(43) }
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
foo()
|
||||
bar()
|
||||
}
|
||||
Reference in New Issue
Block a user