de25359a90
Previously, extension receiver type was not taken into account when
checking for @JvmName annotation applicability to possibly mangled
functions (such functions, however, were mangled).
This bug was fixed, but, unfortunately, not before such functions were
added to stdlib ('sumOf' family).
30 lines
694 B
Kotlin
Vendored
30 lines
694 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
inline class Foo(val x: Int) {
|
|
<!INAPPLICABLE_JVM_NAME!>@JvmName("other")<!>
|
|
fun simple() {}
|
|
}
|
|
|
|
<!INAPPLICABLE_JVM_NAME!>@JvmName("bad")<!>
|
|
fun bar(f: Foo) {}
|
|
|
|
@JvmName("good")
|
|
fun baz(r: Result<Int>) {}
|
|
|
|
@JvmName("test")
|
|
fun returnsInlineClass() = Foo(1)
|
|
|
|
@JvmName("test")
|
|
fun returnsKotlinResult(a: Result<Int>): Result<Int> = a
|
|
|
|
class C {
|
|
<!INAPPLICABLE_JVM_NAME!>@JvmName("test")<!>
|
|
fun returnsInlineClass() = Foo(1)
|
|
|
|
<!INAPPLICABLE_JVM_NAME!>@JvmName("test")<!>
|
|
fun returnsKotlinResult(a: Result<Int>): Result<Int> = a
|
|
}
|
|
|
|
<!INAPPLICABLE_JVM_NAME!>@JvmName("extensionFun")<!>
|
|
fun Foo.extensionFun() {} |