c62093f54c
1. Use 'x' for each parameter, which is not an inline class, every possible clash is handled by signature rather than name. This change makes more API changes binary-compatible. So, the changes are in line with the vision of inline classes are value classes, like primitives. 2. Take return type into account when mangling a function if the return type is inline class. Otherwise, boxing bridge will not be generated, which leads to CCE at runtime.
19 lines
714 B
Kotlin
Vendored
19 lines
714 B
Kotlin
Vendored
// KT-41374
|
|
// !LANGUAGE: +InlineClasses
|
|
// FILE: test.kt
|
|
|
|
package a
|
|
|
|
inline class P(val i: Int)
|
|
|
|
suspend fun foo(p: P = P(1)) {}
|
|
|
|
suspend fun bar(p: P) {}
|
|
|
|
// The mangled name for a suspend function includes the continuation parameter in the hash computation, but not the
|
|
// default argument mask and handler.
|
|
|
|
// 1 public final static foo-opU5HYo\(ILkotlin/coroutines/Continuation;\)Ljava/lang/Object;
|
|
// 1 public static synthetic foo-opU5HYo\$default\(ILkotlin/coroutines/Continuation;ILjava/lang/Object;\)Ljava/lang/Object;
|
|
// 1 INVOKESTATIC a/TestKt.foo-opU5HYo \(ILkotlin/coroutines/Continuation;\)Ljava/lang/Object;
|
|
// 1 public final static bar-opU5HYo\(ILkotlin/coroutines/Continuation;\)Ljava/lang/Object; |