Prohibit @JvmName on functions that are assumed to be mangled

#KT-26454 In Progress
This commit is contained in:
Mikhail Zarechenskiy
2018-09-10 10:38:23 +03:00
parent 5f50977974
commit 55ef96e5c9
8 changed files with 52 additions and 9 deletions
@@ -0,0 +1,13 @@
// !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>) {}
@@ -0,0 +1,13 @@
package
@kotlin.jvm.JvmName(name = "bad") public fun bar(/*0*/ f: Foo): kotlin.Unit
@kotlin.jvm.JvmName(name = "good") public fun baz(/*0*/ r: kotlin.Result<kotlin.Int>): kotlin.Unit
public final inline class Foo {
public constructor Foo(/*0*/ x: kotlin.Int)
public final val x: kotlin.Int
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
@kotlin.jvm.JvmName(name = "other") public final fun simple(): kotlin.Unit
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
}