JVM: Generate equals-impl0 method for inline classes

This commit is contained in:
Steven Schäfer
2019-08-22 12:09:28 +02:00
committed by Alexander Udalov
parent 2c7da67600
commit f53b28e8a3
5 changed files with 45 additions and 32 deletions
@@ -2,7 +2,7 @@
inline class AsNonNullPrimitive(val i: Int)
inline class AsNonNullReference(val s: String)
// ^ JVM: 5 assertions (constructor, box method, erased constructor, 2 assertions in equals--impl)
// ^ JVM: 3 assertions (constructor, box method, erased constructor)
// JVM IR: 1 assertion (erased constructor)
fun nonNullPrimitive(a: AsNonNullPrimitive) {}
@@ -14,7 +14,7 @@ fun asNullablePrimitive(c: AsNonNullPrimitive?) {}
fun asNullableReference(c: AsNonNullReference?) {}
// JVM_TEMPLATES
// 8 checkParameterIsNotNull
// 6 checkParameterIsNotNull
// 0 checkNotNullParameter
// JVM_IR_TEMPLATES