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
+13
@@ -0,0 +1,13 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class S(val string: String)
|
||||
|
||||
fun foo(s: S): String {
|
||||
val anon = object {
|
||||
fun bar() = s.string
|
||||
}
|
||||
return anon.bar()
|
||||
}
|
||||
|
||||
fun box() = foo(S("OK"))
|
||||
Vendored
+50
@@ -0,0 +1,50 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Id(val id: String)
|
||||
|
||||
inline class Name(val name: String)
|
||||
|
||||
inline class Password(val password: String)
|
||||
|
||||
fun Id.test() {
|
||||
if (id != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun Name.test() {
|
||||
if (name != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun test(password: Password) {
|
||||
if (password.password != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
class Outer {
|
||||
fun Id.testExn() {
|
||||
if (id != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun Name.testExn() {
|
||||
if (name != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun testExn(password: Password) {
|
||||
if (password.password != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun testExns() {
|
||||
Id("OK").testExn()
|
||||
Name("OK").testExn()
|
||||
testExn(Password("OK"))
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
Id("OK").test()
|
||||
Name("OK").test()
|
||||
test(Password("OK"))
|
||||
|
||||
Outer().testExns()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Id(val id: String)
|
||||
|
||||
fun test(id: Id) {
|
||||
if (id.id != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun test(id: Id?) {
|
||||
if (id != null) throw AssertionError()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(Id("OK"))
|
||||
test(null)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class S1(val s1: String)
|
||||
inline class S2(val s2: String)
|
||||
|
||||
object X1
|
||||
object X2
|
||||
|
||||
fun <T> test(s1: S1, x: T) {
|
||||
if (s1.s1 != "OK" && x != X1) throw AssertionError()
|
||||
}
|
||||
|
||||
fun <T> test(s2: S2, x: T) {
|
||||
if (s2.s2 != "OK" && x != X2) throw AssertionError()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(S1("OK"), X1)
|
||||
test(S2("OK"), X2)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class S(val string: String)
|
||||
|
||||
fun foo(s: S): String {
|
||||
class Local {
|
||||
fun bar() = s.string
|
||||
}
|
||||
return Local().bar()
|
||||
}
|
||||
|
||||
fun box() = foo(S("OK"))
|
||||
Vendored
+89
@@ -0,0 +1,89 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Id(val id: String)
|
||||
|
||||
inline class Name(val name: String)
|
||||
|
||||
interface IA {
|
||||
fun fromInterface(id: Id)
|
||||
fun fromInterface(name: Name)
|
||||
|
||||
fun fromBoth(id: Id)
|
||||
fun fromBoth(name: Name)
|
||||
|
||||
fun withDefaultImpl(id: Id) {
|
||||
if (id.id != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun withDefaultImpl(name: Name) {
|
||||
if (name.name != "OK") throw AssertionError()
|
||||
}
|
||||
}
|
||||
|
||||
abstract class Base {
|
||||
abstract fun fromClass(id: Id)
|
||||
abstract fun fromClass(name: Name)
|
||||
|
||||
abstract fun fromBoth(id: Id)
|
||||
abstract fun fromBoth(name: Name)
|
||||
}
|
||||
|
||||
|
||||
class C : Base(), IA {
|
||||
override fun fromInterface(id: Id) {
|
||||
if (id.id != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
override fun fromInterface(name: Name) {
|
||||
if (name.name != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
override fun fromClass(id: Id) {
|
||||
if (id.id != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
override fun fromClass(name: Name) {
|
||||
if (name.name != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
override fun fromBoth(id: Id) {
|
||||
if (id.id != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
override fun fromBoth(name: Name) {
|
||||
if (name.name != "OK") throw AssertionError()
|
||||
}
|
||||
}
|
||||
|
||||
fun testIA(a: IA) {
|
||||
a.fromInterface(Id("OK"))
|
||||
a.fromInterface(Name("OK"))
|
||||
|
||||
a.fromBoth(Id("OK"))
|
||||
a.fromBoth(Name("OK"))
|
||||
|
||||
a.withDefaultImpl(Id("OK"))
|
||||
a.withDefaultImpl(Name("OK"))
|
||||
}
|
||||
|
||||
fun testBase(b: Base) {
|
||||
b.fromClass(Id("OK"))
|
||||
b.fromClass(Name("OK"))
|
||||
|
||||
b.fromBoth(Id("OK"))
|
||||
b.fromBoth(Name("OK"))
|
||||
}
|
||||
|
||||
fun testC(c: C) {
|
||||
c.withDefaultImpl(Id("OK"))
|
||||
c.withDefaultImpl(Name("OK"))
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
testIA(C())
|
||||
testBase(C())
|
||||
testC(C())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Id(val id: String)
|
||||
|
||||
inline class Name(val name: String)
|
||||
|
||||
inline class Password(val password: String)
|
||||
|
||||
fun test(id: Id) {
|
||||
if (id.id != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun test(name: Name) {
|
||||
if (name.name != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun test(password: Password) {
|
||||
if (password.password != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(Id("OK"))
|
||||
test(Name("OK"))
|
||||
test(Password("OK"))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR, JS, JS_IR
|
||||
// FULL_JDK
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Id(val id: String)
|
||||
|
||||
fun throws() {
|
||||
throw RuntimeException()
|
||||
}
|
||||
|
||||
fun test(id: Id) {
|
||||
throws()
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
test(Id("id"))
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val stackTrace = try {
|
||||
foo()
|
||||
throw AssertionError()
|
||||
} catch (e: RuntimeException) {
|
||||
e.stackTrace
|
||||
}
|
||||
|
||||
for (entry in stackTrace) {
|
||||
if (entry.methodName.startsWith("test$")) {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
throw AssertionError()
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Id(val id: String)
|
||||
|
||||
fun test(id: Id, str: String) {
|
||||
if (id.id != "OK" && str != "1") throw AssertionError()
|
||||
}
|
||||
|
||||
fun test(str: String, id: Id) {
|
||||
if (id.id != "OK" && str != "2") throw AssertionError()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(Id("OK"), "1")
|
||||
test("2", Id("OK"))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
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
|
||||
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
abstract class GenericBase<T> {
|
||||
abstract fun foo(x: T): T
|
||||
}
|
||||
|
||||
interface IFoo {
|
||||
fun foo(x: String): String
|
||||
}
|
||||
|
||||
inline class Str(val str: String)
|
||||
|
||||
class Derived : GenericBase<Str>(), IFoo {
|
||||
override fun foo(x: Str): Str = x
|
||||
override fun foo(x: String): String = x
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (Derived().foo(Str("OK")).str != "OK") throw AssertionError()
|
||||
if (Derived().foo("OK") != "OK") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Str(val string: String)
|
||||
|
||||
class C {
|
||||
var s = Str("")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val x = C()
|
||||
x.s = Str("OK")
|
||||
return x.s.string
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR, JS, JS_IR
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
inline class S(val string: String)
|
||||
|
||||
fun foo(s: S) = s
|
||||
|
||||
fun box(): String {
|
||||
val fooRef = ::foo
|
||||
|
||||
assertEquals("abc", fooRef.invoke(S("abc")).string)
|
||||
assertEquals("foo", fooRef.name)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR, JS, JS_IR
|
||||
// WITH_REFLECT
|
||||
import kotlin.test.*
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
inline class S(val string: String)
|
||||
|
||||
fun test(s: S) {
|
||||
class Local
|
||||
|
||||
val localKClass = Local::class
|
||||
val localJClass = localKClass.java
|
||||
|
||||
assertEquals("test\$Local", localKClass.simpleName)
|
||||
|
||||
assertTrue { localJClass.isLocalClass }
|
||||
assertEquals("test\$Local", localJClass.simpleName)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test(S(""))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR, JS, JS_IR
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
inline class S(val string: String)
|
||||
|
||||
var prop = S("")
|
||||
|
||||
fun box(): String {
|
||||
val propRef = ::prop
|
||||
|
||||
assertEquals(S(""), propRef.get())
|
||||
|
||||
propRef.set(S("abc"))
|
||||
assertEquals(S("abc"), propRef.get())
|
||||
|
||||
assertEquals("prop", propRef.name)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class S(val string: String)
|
||||
|
||||
class Outer {
|
||||
private fun foo(s: S) = s.string
|
||||
|
||||
inner class Inner(val string: String) {
|
||||
fun bar() = foo(S(string))
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = Outer().Inner("OK").bar()
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class S(val string: String)
|
||||
|
||||
class Outer {
|
||||
private var pr = S("")
|
||||
|
||||
inner class Inner() {
|
||||
fun updateOuter(string: String): String {
|
||||
pr = S(string)
|
||||
return pr.string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String =
|
||||
Outer().Inner().updateOuter("OK")
|
||||
+1
-1
@@ -14,5 +14,5 @@ inline class Foo(val x: Int) {
|
||||
|
||||
// 1 INVOKESTATIC Foo\$Erased.empty \(I\)V
|
||||
// 1 INVOKESTATIC Foo\$Erased.withParam \(ILjava/lang/String;\)V
|
||||
// 1 INVOKESTATIC Foo\$Erased.withInlineClassParam \(II\)V
|
||||
// 1 INVOKESTATIC Foo\$Erased.withInlineClassParam\$1e4ch6lh \(II\)V
|
||||
// 5 INVOKEVIRTUAL
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class Str(val s: String)
|
||||
|
||||
class C1(val ss: Str)
|
||||
|
||||
class C2(val ss1: Str, val ss2: Str)
|
||||
|
||||
// 2 public \<init\>\(Ljava/lang/String;\)V
|
||||
// 1 public \<init\>\(Ljava/lang/String;Ljava/lang/String;\)V
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Id(val id: String)
|
||||
|
||||
inline class Name(val name: String)
|
||||
|
||||
inline class Password(val password: String)
|
||||
|
||||
fun test(id: Id) {
|
||||
if (id.id != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun test(id: Id?) {
|
||||
if (id != null) throw AssertionError()
|
||||
}
|
||||
|
||||
fun test(name: Name) {
|
||||
if (name.name != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
fun test(password: Password) {
|
||||
if (password.password != "OK") throw AssertionError()
|
||||
}
|
||||
|
||||
// 1 public final static test\$9zx0e0j9\(Ljava/lang/String;\)V
|
||||
// 1 public final static test\$79jv2l6i\(Ljava/lang/String;\)V
|
||||
// 1 public final static test\$d4pejdz3\(Ljava/lang/String;\)V
|
||||
// 1 public final static test\$c6sgoxk6\(Ljava/lang/String;\)V
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class Str(val string: String)
|
||||
|
||||
class C {
|
||||
var s = Str("")
|
||||
}
|
||||
|
||||
// 1 public final getS\(\)Ljava/lang/String;
|
||||
// 1 public final setS\$90215lrx\(Ljava/lang/String;\)V
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
inline class X(val x: Int)
|
||||
inline class Z(val x: Int)
|
||||
inline class Str(val str: String)
|
||||
inline class Name(val name: String)
|
||||
inline class NStr(val str: String?)
|
||||
|
||||
fun testSimple(x: X) {}
|
||||
fun testSimple(z: Z) {}
|
||||
|
||||
fun testMixed(x: Int, y: Int) {}
|
||||
fun testMixed(x: X, y: Int) {}
|
||||
fun testMixed(x: Int, y: X) {}
|
||||
fun testMixed(x: X, y: X) {}
|
||||
|
||||
fun testNewType(s: Str) {}
|
||||
fun testNewType(name: Name) {}
|
||||
|
||||
fun testNullableVsNonNull1(s: Str) {}
|
||||
fun testNullableVsNonNull1(s: Str?) {}
|
||||
|
||||
fun testNullableVsNonNull2(ns: NStr) {}
|
||||
fun testNullableVsNonNull2(ns: NStr?) {}
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun testFunVsExt(x: X)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun X.testFunVsExt()<!> {}
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun testNonGenericVsGeneric(x: X, y: Number)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun <T : Number> testNonGenericVsGeneric(x: X, y: T)<!> {}
|
||||
|
||||
class C<TC : Number> {
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun testNonGenericVsGeneric(x: X, y: Number)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun <T : Number> testNonGenericVsGeneric(x: X, y: T)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun testNonGenericVsGeneric(x: X, y: TC)<!> {}
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package
|
||||
|
||||
public fun testFunVsExt(/*0*/ x: X): kotlin.Unit
|
||||
public fun testMixed(/*0*/ x: X, /*1*/ y: X): kotlin.Unit
|
||||
public fun testMixed(/*0*/ x: X, /*1*/ y: kotlin.Int): kotlin.Unit
|
||||
public fun testMixed(/*0*/ x: kotlin.Int, /*1*/ y: X): kotlin.Unit
|
||||
public fun testMixed(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int): kotlin.Unit
|
||||
public fun testNewType(/*0*/ name: Name): kotlin.Unit
|
||||
public fun testNewType(/*0*/ s: Str): kotlin.Unit
|
||||
public fun </*0*/ T : kotlin.Number> testNonGenericVsGeneric(/*0*/ x: X, /*1*/ y: T): kotlin.Unit
|
||||
public fun testNonGenericVsGeneric(/*0*/ x: X, /*1*/ y: kotlin.Number): kotlin.Unit
|
||||
public fun testNullableVsNonNull1(/*0*/ s: Str): kotlin.Unit
|
||||
public fun testNullableVsNonNull1(/*0*/ s: Str?): kotlin.Unit
|
||||
public fun testNullableVsNonNull2(/*0*/ ns: NStr): kotlin.Unit
|
||||
public fun testNullableVsNonNull2(/*0*/ ns: NStr?): kotlin.Unit
|
||||
public fun testSimple(/*0*/ x: X): kotlin.Unit
|
||||
public fun testSimple(/*0*/ z: Z): kotlin.Unit
|
||||
public fun X.testFunVsExt(): kotlin.Unit
|
||||
|
||||
public final class C</*0*/ TC : kotlin.Number> {
|
||||
public constructor C</*0*/ TC : kotlin.Number>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun </*0*/ T : kotlin.Number> testNonGenericVsGeneric(/*0*/ x: X, /*1*/ y: T): kotlin.Unit
|
||||
public final fun testNonGenericVsGeneric(/*0*/ x: X, /*1*/ y: TC): kotlin.Unit
|
||||
public final fun testNonGenericVsGeneric(/*0*/ x: X, /*1*/ y: kotlin.Number): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class NStr {
|
||||
public constructor NStr(/*0*/ str: kotlin.String?)
|
||||
public final val str: kotlin.String?
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class Name {
|
||||
public constructor Name(/*0*/ name: kotlin.String)
|
||||
public final val name: kotlin.String
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class Str {
|
||||
public constructor Str(/*0*/ str: kotlin.String)
|
||||
public final val str: kotlin.String
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class X {
|
||||
public constructor X(/*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
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inline class Z {
|
||||
public constructor Z(/*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
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class Name(val name: String)
|
||||
inline class Password(val password: String)
|
||||
|
||||
interface NameVerifier {
|
||||
fun verify(name: Name)
|
||||
}
|
||||
|
||||
interface PasswordVerifier {
|
||||
fun verify(password: Password)
|
||||
}
|
||||
|
||||
interface NameAndPasswordVerifier : NameVerifier, PasswordVerifier
|
||||
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
package
|
||||
|
||||
public final inline class Name {
|
||||
public constructor Name(/*0*/ name: kotlin.String)
|
||||
public final val name: kotlin.String
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface NameAndPasswordVerifier : NameVerifier, PasswordVerifier {
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public abstract override /*1*/ /*fake_override*/ fun verify(/*0*/ name: Name): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun verify(/*0*/ password: Password): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface NameVerifier {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public abstract fun verify(/*0*/ name: Name): kotlin.Unit
|
||||
}
|
||||
|
||||
public final inline class Password {
|
||||
public constructor Password(/*0*/ password: kotlin.String)
|
||||
public final val password: kotlin.String
|
||||
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface PasswordVerifier {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public abstract fun verify(/*0*/ password: Password): kotlin.Unit
|
||||
}
|
||||
+1
-1
@@ -25,6 +25,6 @@ inline class Foo(val x: Int) {
|
||||
// jvm signature: (ILjava/lang/Object;D)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Foo$Erased::withInlineClassType
|
||||
// method: Foo$Erased::withInlineClassType$1e4ch6lh
|
||||
// jvm signature: (II)V
|
||||
// generic signature: null
|
||||
|
||||
+3
-3
@@ -9,15 +9,15 @@ object Test {
|
||||
fun nullableValue(f: Foo<Long>?) {}
|
||||
}
|
||||
|
||||
// method: Test::nonNullTypeArgument
|
||||
// method: Test::nonNullTypeArgument$1e4ch6lh
|
||||
// jvm signature: (Ljava/util/List;)V
|
||||
// generic signature: (Ljava/util/List<Ljava/lang/Integer;>;)V
|
||||
|
||||
// method: Test::nullableTypeArgument
|
||||
// method: Test::nullableTypeArgument$1e4ch6lh
|
||||
// jvm signature: (Ljava/util/List;)V
|
||||
// generic signature: (Ljava/util/List<Ljava/lang/String;>;)V
|
||||
|
||||
// method: Test::nullableValue
|
||||
// method: Test::nullableValue$31ee2c96
|
||||
// jvm signature: (Ljava/util/List;)V
|
||||
// generic signature: (Ljava/util/List<Ljava/lang/Long;>;)V
|
||||
|
||||
|
||||
Vendored
+5
-5
@@ -15,23 +15,23 @@ object Test {
|
||||
fun asNullableAndNullableTypeArgument(a: Default<Int?>?) {}
|
||||
}
|
||||
|
||||
// method: Test::withNotNullPrimitive
|
||||
// method: Test::withNotNullPrimitive$7odoyk9m
|
||||
// jvm signature: (Ljava/lang/Object;)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::withAdditionalGenericParameter
|
||||
// method: Test::withAdditionalGenericParameter$1k09dck1
|
||||
// jvm signature: (LInv;Ljava/lang/Object;)V
|
||||
// generic signature: (LInv<Ljava/lang/String;>;Ljava/lang/Object;)V
|
||||
|
||||
// method: Test::asNullable
|
||||
// method: Test::asNullable$ao7usvyu
|
||||
// jvm signature: (LDefault;)V
|
||||
// generic signature: (LDefault<Ljava/lang/Integer;>;)V
|
||||
|
||||
// method: Test::asNullableTypeArgument
|
||||
// method: Test::asNullableTypeArgument$7odoyk9m
|
||||
// jvm signature: (Ljava/lang/Object;)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::asNullableAndNullableTypeArgument
|
||||
// method: Test::asNullableAndNullableTypeArgument$ao7usvyu
|
||||
// jvm signature: (LDefault;)V
|
||||
// generic signature: (LDefault<Ljava/lang/Integer;>;)V
|
||||
|
||||
|
||||
Vendored
+4
-4
@@ -14,18 +14,18 @@ object Test {
|
||||
fun asNullableForNullableValue(a: NullableValue<Int>?) {}
|
||||
}
|
||||
|
||||
// method: Test::withNotNullPrimitive
|
||||
// method: Test::withNotNullPrimitive$7l8qu2mt
|
||||
// jvm signature: (Ljava/lang/Object;)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::asNullable
|
||||
// method: Test::asNullable$4hed6sie
|
||||
// jvm signature: (Ljava/lang/Object;)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::withNotNullForNullableValue
|
||||
// method: Test::withNotNullForNullableValue$c6wvqrdl
|
||||
// jvm signature: (Ljava/lang/Object;)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::asNullableForNullableValue
|
||||
// method: Test::asNullableForNullableValue$aloai6d9
|
||||
// jvm signature: (LNullableValue;)V
|
||||
// generic signature: (LNullableValue<Ljava/lang/Integer;>;)V
|
||||
+1
-1
@@ -8,7 +8,7 @@ object Test {
|
||||
fun listOfFoo(f: List<Foo>) {}
|
||||
}
|
||||
|
||||
// method: Test::simple
|
||||
// method: Test::simple$1e4ch6lh
|
||||
// jvm signature: (I)V
|
||||
// generic signature: null
|
||||
|
||||
|
||||
+6
-6
@@ -16,26 +16,26 @@ object Test {
|
||||
fun withInnerGenericInlineClassIn(a: AsCmp<AsCmp<Comparable<UInt>>>) {}
|
||||
}
|
||||
|
||||
// method: Test::withInlineClassArgumentOut
|
||||
// method: Test::withInlineClassArgumentOut$5xv5g663
|
||||
// jvm signature: (Ljava/util/List;)V
|
||||
// generic signature: (Ljava/util/List<LUInt;>;)V
|
||||
|
||||
// method: Test::withInlineClassArgumentIn
|
||||
// method: Test::withInlineClassArgumentIn$brqdr5wn
|
||||
// jvm signature: (Ljava/lang/Comparable;)V
|
||||
// generic signature: (Ljava/lang/Comparable<-LUInt;>;)V
|
||||
|
||||
// method: Test::withListOfInlineClassArgument
|
||||
// method: Test::withListOfInlineClassArgument$5xv5g663
|
||||
// jvm signature: (Ljava/util/List;)V
|
||||
// generic signature: (Ljava/util/List<+Ljava/util/List<LUInt;>;>;)V
|
||||
|
||||
// method: Test::withComparableOfInlineClassArgument
|
||||
// method: Test::withComparableOfInlineClassArgument$brqdr5wn
|
||||
// jvm signature: (Ljava/lang/Comparable;)V
|
||||
// generic signature: (Ljava/lang/Comparable<-Ljava/lang/Comparable<-LUInt;>;>;)V
|
||||
|
||||
// method: Test::withInnerGenericInlineClassOut
|
||||
// method: Test::withInnerGenericInlineClassOut$5xv5g663
|
||||
// jvm signature: (Ljava/util/List;)V
|
||||
// generic signature: (Ljava/util/List<LAsList<Ljava/util/List<LUInt;>;>;>;)V
|
||||
|
||||
// method: Test::withInnerGenericInlineClassIn
|
||||
// method: Test::withInnerGenericInlineClassIn$brqdr5wn
|
||||
// jvm signature: (Ljava/lang/Comparable;)V
|
||||
// generic signature: (Ljava/lang/Comparable<-LAsCmp<Ljava/lang/Comparable<LUInt;>;>;>;)V
|
||||
@@ -13,18 +13,18 @@ object Test {
|
||||
fun withNullableReferenceAsNullable(a: InlineNullableReference?) {}
|
||||
}
|
||||
|
||||
// method: Test::withPrimitiveAsNullable
|
||||
// method: Test::withPrimitiveAsNullable$arwt9fzf
|
||||
// jvm signature: (LInlinePrimitive;)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::withReferenceAsNullable
|
||||
// method: Test::withReferenceAsNullable$8k1ogbuu
|
||||
// jvm signature: (Ljava/lang/String;)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::withNullablePrimitiveAsNullable
|
||||
// method: Test::withNullablePrimitiveAsNullable$aiqm4cvc
|
||||
// jvm signature: (LInlineNullablePrimitive;)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::withNullableReferenceAsNullable
|
||||
// method: Test::withNullableReferenceAsNullable$7pmrpo2y
|
||||
// jvm signature: (LInlineNullableReference;)V
|
||||
// generic signature: null
|
||||
Vendored
+3
-3
@@ -9,7 +9,7 @@ object Test {
|
||||
fun Foo.asAll(x: Any?, a: Foo, b: Int): Foo = TODO()
|
||||
}
|
||||
|
||||
// method: Test::asParam
|
||||
// method: Test::asParam$1e4ch6lh
|
||||
// jvm signature: (I)V
|
||||
// generic signature: null
|
||||
|
||||
@@ -17,10 +17,10 @@ object Test {
|
||||
// jvm signature: ()I
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::asExtension
|
||||
// method: Test::asExtension$1e4ch6lh
|
||||
// jvm signature: (I)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::asAll
|
||||
// method: Test::asAll$dmjdpekg
|
||||
// jvm signature: (ILjava/lang/Object;II)I
|
||||
// generic signature: null
|
||||
|
||||
Vendored
+1
-1
@@ -10,7 +10,7 @@ object Test {
|
||||
fun asReturn(): Bar = TODO()
|
||||
}
|
||||
|
||||
// method: Test::asParam
|
||||
// method: Test::asParam$1e4ch6lh
|
||||
// jvm signature: (Ljava/lang/Integer;)V
|
||||
// generic signature: null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user