c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
30 lines
574 B
Kotlin
Vendored
30 lines
574 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
// WITH_STDLIB
|
|
|
|
inline class Foo(val a: Any)
|
|
|
|
@JvmName("bar")
|
|
fun bar(f: Foo) {}
|
|
|
|
@JvmName("baz")
|
|
fun baz(r: Result<Int>) {}
|
|
|
|
@JvmName("test")
|
|
fun returnsInlineClass() = Foo(1)
|
|
|
|
@JvmName("test")
|
|
@Suppress("RESULT_CLASS_IN_RETURN_TYPE")
|
|
fun returnsKotlinResult(a: Result<Int>): Result<Int> = a
|
|
|
|
class C {
|
|
@JvmName("test")
|
|
fun returnsInlineClass() = Foo(1)
|
|
|
|
@JvmName("test")
|
|
@Suppress("RESULT_CLASS_IN_RETURN_TYPE")
|
|
fun returnsKotlinResult(a: Result<Int>): Result<Int> = a
|
|
}
|
|
|
|
@JvmName("extensionFun")
|
|
fun Foo.extensionFun() {}
|