Mangle function names with inline class parameters
Avoid name clashes in cases such as
inline class Login(val login: String)
inline class Password(val password: String)
fun validate(login: Login) { ... }
fun validate(password: Password) { ... }
This commit is contained in:
committed by
Ilya Gorbunov
parent
ff9ba97d66
commit
a56d1d3ce8
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
abstract class GenericBase<T> {
|
||||
abstract fun foo(x: T): T
|
||||
}
|
||||
|
||||
inline class Str(val str: String)
|
||||
|
||||
class Derived : GenericBase<Str>() {
|
||||
override fun foo(x: Str): Str = x
|
||||
}
|
||||
|
||||
fun box() = Derived().foo(Str("OK")).str
|
||||
Reference in New Issue
Block a user