Skip to content

Commit ccd8ae9

Browse files
authored
K2 support (#1525)
1 parent be75e66 commit ccd8ae9

File tree

28 files changed

+455
-31
lines changed

28 files changed

+455
-31
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* None.
55

66
### Enhancements
7-
* None.
7+
* Support for experimental K2-compilation with `kotlin.experimental.tryK2=true`. (Issue [#1483](https://github.com/realm/realm-kotlin/issues/1483))
88

99
### Fixed
1010
* None.
@@ -13,7 +13,7 @@
1313
* File format: Generates Realms with file format v23.
1414
* Realm Studio 13.0.0 or above is required to open Realms created by this version.
1515
* This release is compatible with the following Kotlin releases:
16-
* Kotlin 1.8.0 and above. The K2 compiler is not supported yet.
16+
* Kotlin 1.9.0 and above. Support for experimental K2-compilation with `kotlin.experimental.tryK2=true`.
1717
* Ktor 2.1.2 and above.
1818
* Coroutines 1.7.0 and above.
1919
* AtomicFu 0.18.3 and above.
@@ -22,6 +22,7 @@
2222
* Minimum Gradle version: 6.8.3.
2323
* Minimum Android Gradle Plugin version: 4.1.3.
2424
* Minimum Android SDK: 16.
25+
* Minimum R8: 8.0.34.
2526

2627
### Internal
2728
* None.

Jenkinsfile

+2
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ pipeline {
247247
when { expression { runTests } }
248248
steps {
249249
testAndCollect("integration-tests/gradle-plugin-test", "integrationTest")
250+
testAndCollect("integration-tests/gradle-plugin-test", "-Pkotlin.experimental.tryK2=true integrationTest")
250251
}
251252
}
252253
stage('Tests Android Sample App') {
@@ -268,6 +269,7 @@ pipeline {
268269
when { expression { runTests } }
269270
steps {
270271
testAndCollect("examples/realm-java-compatibility", "connectedAndroidTest")
272+
testAndCollect("examples/realm-java-compatibility", "-Pkotlin.experimental.tryK2=true connectedAndroidTest")
271273
}
272274
}
273275
stage('Track build metrics') {

buildSrc/src/main/kotlin/Config.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ object Versions {
103103
const val buildToolsVersion = "33.0.0"
104104
const val buildTools = "7.3.1" // https://maven.google.com/web/index.html?q=gradle#com.android.tools.build:gradle
105105
const val ndkVersion = "23.2.8568313"
106-
const val r8 = "4.0.48" // See https://developer.android.com/build/kotlin-support
106+
const val r8 = "8.0.34" // See https://developer.android.com/build/kotlin-support
107107
}
108108
const val androidxBenchmarkPlugin = "1.2.0-alpha12" // https://maven.google.com/web/index.html#androidx.benchmark:androidx.benchmark.gradle.plugin
109109
const val androidxStartup = "1.1.1" // https://maven.google.com/web/index.html?q=startup#androidx.startup:startup-runtime
@@ -119,14 +119,14 @@ object Versions {
119119
const val coroutines = "1.7.0" // https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core
120120
const val datetime = "0.4.0" // https://github.com/Kotlin/kotlinx-datetime
121121
const val detektPlugin = "1.22.0-RC2" // https://github.com/detekt/detekt
122-
const val dokka = "1.6.0" // https://github.com/Kotlin/dokka
122+
const val dokka = "1.9.0" // https://github.com/Kotlin/dokka
123123
const val gradlePluginPublishPlugin = "0.15.0" // https://plugins.gradle.org/plugin/com.gradle.plugin-publish
124124
const val jmh = "1.34" // https://github.com/openjdk/jmh
125125
const val jmhPlugin = "0.6.6" // https://github.com/melix/jmh-gradle-plugin
126126
const val junit = "4.13.2" // https://mvnrepository.com/artifact/junit/junit
127127
const val kbson = "0.3.0" // https://github.com/mongodb/kbson
128128
// When updating the Kotlin version, also remember to update /examples/min-android-sample/build.gradle.kts
129-
const val kotlin = "1.8.21" // https://github.com/JetBrains/kotlin and https://kotlinlang.org/docs/releases.html#release-details
129+
const val kotlin = "1.9.0" // https://github.com/JetBrains/kotlin and https://kotlinlang.org/docs/releases.html#release-details
130130
const val kotlinJvmTarget = "1.8" // Which JVM bytecode version is kotlin compiled to.
131131
const val latestKotlin = "1.9.20-Beta" // https://kotlinlang.org/docs/eap.html#build-details
132132
const val kotlinCompileTesting = "1.5.0" // https://github.com/tschuchortdev/kotlin-compile-testing
@@ -136,7 +136,7 @@ object Versions {
136136
const val nexusPublishPlugin = "1.1.0" // https://github.com/gradle-nexus/publish-plugin
137137
const val okio = "3.2.0" // https://square.github.io/okio/#releases
138138
const val relinker = "1.4.5" // https://github.com/KeepSafe/ReLinker
139-
const val serialization = "1.4.0" // https://kotlinlang.org/docs/releases.html#release-details
139+
const val serialization = "1.6.0" // https://kotlinlang.org/docs/releases.html#release-details
140140
const val shadowJar = "6.1.0" // https://mvnrepository.com/artifact/com.github.johnrengelman.shadow/com.github.johnrengelman.shadow.gradle.plugin?repo=gradle-plugins
141141
val sourceCompatibilityVersion = JavaVersion.VERSION_1_8 // Language level of any Java source code.
142142
val targetCompatibilityVersion = JavaVersion.VERSION_1_8 // Version of generated JVM bytecode from Java files.

examples/kmm-sample/shared/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ kotlin {
6464
implementation("com.google.android.material:material:1.2.0")
6565
}
6666
}
67-
val androidTest by getting {
67+
val androidInstrumentedTest by getting {
6868
dependencies {
6969
implementation(kotlin("test-junit"))
7070
implementation("junit:junit:4.12")

integration-tests/gradle-plugin-test/multi-platform/src/nativeTest/kotlin/io/realm/test/multiplatform/util/platform/PlatformUtils.kt

+3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@
1515
* limitations under the License.
1616
*/
1717

18+
@file:OptIn(ExperimentalForeignApi::class)
19+
1820
package io.realm.test.multiplatform.util.platform
1921

22+
import kotlinx.cinterop.ExperimentalForeignApi
2023
import kotlinx.cinterop.cstr
2124

2225
actual object PlatformUtils {

packages/cinterop/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ kotlin {
271271
compilations.all {
272272
kotlinOptions {
273273
freeCompilerArgs += listOf("-opt-in=kotlin.ExperimentalUnsignedTypes")
274+
freeCompilerArgs += listOf("-opt-in=kotlinx.cinterop.ExperimentalForeignApi")
274275
}
275276
}
276277
}

packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ actual object RealmInterop {
19851985
realm_wrapper.realm_app_get_all_users(
19861986
app.cptr(),
19871987
null,
1988-
0,
1988+
0UL,
19891989
capacityCount.ptr
19901990
)
19911991
)

packages/cinterop/src/nativeDarwinTest/kotlin/io/realm/kotlin/test/CinteropTest.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ class CinteropTest {
136136
classes[0].apply {
137137
name = "foo".cstr.ptr
138138
primary_key = "".cstr.ptr
139-
num_properties = 1.toULong()
140-
num_computed_properties = 0.toULong()
139+
num_properties = 1UL
140+
num_computed_properties = 0UL
141141
flags = RLM_CLASS_NORMAL.toInt()
142142
}
143143

144144
val classProperties: CPointer<CPointerVarOf<CPointer<realm_property_info_t>>> =
145145
cValuesOf(prop_1_1.ptr).ptr
146-
val realmSchemaNew = realm_schema_new(classes, 1.toULong(), classProperties)
146+
val realmSchemaNew = realm_schema_new(classes, 1UL, classProperties)
147147

148148
assertNoError()
149149
assertTrue(
@@ -157,7 +157,7 @@ class CinteropTest {
157157
realm_config_set_path(config, "c_api_test.realm")
158158
realm_config_set_schema(config, realmSchemaNew)
159159
realm_config_set_schema_mode(config, realm_schema_mode_e.RLM_SCHEMA_MODE_AUTOMATIC)
160-
realm_config_set_schema_version(config, 1)
160+
realm_config_set_schema_version(config, 1UL)
161161

162162
val realm: CPointer<realm_t>? = realm_open(config)
163163
assertEquals(1U, realm_get_num_classes(realm))

packages/library-base/build.gradle.kts

+6-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ kotlin {
128128
// name and build type variant as a suffix, this default behaviour can cause mismatch at runtime https://github.com/realm/realm-kotlin/issues/621
129129
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
130130
kotlinOptions {
131-
freeCompilerArgs = listOf("-module-name", "io.realm.kotlin.library")
131+
freeCompilerArgs += listOf("-module-name", "io.realm.kotlin.library")
132+
}
133+
}
134+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile>().all {
135+
kotlinOptions {
136+
freeCompilerArgs += listOf("-opt-in=kotlinx.cinterop.ExperimentalForeignApi")
132137
}
133138
}
134139

packages/library-sync/src/androidMain/kotlin/io/realm/kotlin/mongodb/internal/RealmSyncInitializer.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import io.realm.kotlin.log.RealmLog
3535
* An **initializer** for Sync specific functionality that does not fit into the `RealmInitializer`
3636
* in cinterop.o allow Realm to access context properties.
3737
*/
38-
class RealmSyncInitializer : Initializer<Context> {
38+
internal class RealmSyncInitializer : Initializer<Context> {
3939

4040
companion object {
4141
@Suppress("DEPRECATION") // Should only be called below API 21

packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/MutableSubscriptionSetImpl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ internal class MutableSubscriptionSetImpl<T : BaseRealm>(
8787
return result
8888
}
8989

90-
@Suppress("invisible_member")
90+
@Suppress("invisible_member", "invisible_reference")
9191
override fun <T : RealmObject> removeAll(type: KClass<T>): Boolean {
9292
var result = false
9393
val objectType = io.realm.kotlin.internal.platform.realmObjectCompanionOrThrow(type).`io_realm_kotlin_className`

packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/SubscriptionImpl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ internal class SubscriptionImpl(
4242
// Trim the query to match the output of RealmQuery.description()
4343
override val queryDescription: String = RealmInterop.realm_sync_subscription_query_string(nativePointer).trim()
4444

45-
@Suppress("invisible_member")
45+
@Suppress("invisible_member", "invisible_reference")
4646
override fun <T : RealmObject> asQuery(type: KClass<T>): RealmQuery<T> {
4747
// TODO Check for invalid combinations of Realm and type once we properly support
4848
// DynamicRealm

packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/SyncConfigurationImpl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ internal class SyncConfigurationImpl(
222222
initializerHelper.onSyncError(session, frozenAppPointer, error)
223223
}
224224
} catch (ex: Exception) {
225-
@Suppress("invisible_member")
225+
@Suppress("invisible_member", "invisible_reference")
226226
RealmLog.error("Error thrown and ignored in `onManualResetFallback`: $ex")
227227
}
228228
} else {

packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/SyncSessionImpl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ internal open class SyncSessionImpl(
139139
}
140140
}
141141

142-
@Suppress("invisible_member") // To be able to use RealmImpl.scopedFlow from library-base
142+
@Suppress("invisible_member", "invisible_reference") // To be able to use RealmImpl.scopedFlow from library-base
143143
override fun connectionStateAsFlow(): Flow<ConnectionStateChange> = realm.scopedFlow {
144144
callbackFlow {
145145
val token: AtomicRef<Cancellable> = kotlinx.atomicfu.atomic(NO_OP_NOTIFICATION_TOKEN)

packages/plugin-compiler/src/main/kotlin/io/realm/kotlin/compiler/Identifiers.kt

+10-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ import org.jetbrains.kotlin.name.Name
2626
internal object Names {
2727
const val REALM_SYNTHETIC_PROPERTY_PREFIX = "io_realm_kotlin_"
2828

29+
val REALM_OBJECT: Name = Name.identifier("RealmObject")
30+
val EMBEDDED_REALM_OBJECT: Name = Name.identifier("EmbeddedRealmObject")
31+
val ASYMMETRIC_REALM_OBJECT: Name = Name.identifier("AsymmetricRealmObject")
32+
2933
val REALM_OBJECT_COMPANION_CLASS_MEMBER: Name =
3034
Name.identifier("${REALM_SYNTHETIC_PROPERTY_PREFIX}class")
3135
val REALM_OBJECT_COMPANION_CLASS_NAME_MEMBER: Name =
@@ -40,6 +44,9 @@ internal object Names {
4044
Name.identifier("${REALM_SYNTHETIC_PROPERTY_PREFIX}schema")
4145
val REALM_OBJECT_COMPANION_NEW_INSTANCE_METHOD =
4246
Name.identifier("${REALM_SYNTHETIC_PROPERTY_PREFIX}newInstance")
47+
val REALM_OBJECT_TO_STRING_METHOD = Name.identifier("toString")
48+
val REALM_OBJECT_EQUALS = Name.identifier("equals")
49+
val REALM_OBJECT_HASH_CODE = Name.identifier("hashCode")
4350

4451
val SET = Name.special("<set-?>")
4552

@@ -90,11 +97,12 @@ internal object FqNames {
9097
val PACKAGE_KBSON = FqName("org.mongodb.kbson")
9198
val PACKAGE_KOTLIN_COLLECTIONS = FqName("kotlin.collections")
9299
val PACKAGE_KOTLIN_REFLECT = FqName("kotlin.reflect")
93-
val PACKAGE_TYPES = FqName("io.realm.kotlin.types")
100+
val PACKAGE_TYPES: FqName = FqName("io.realm.kotlin.types")
94101
val PACKAGE_REALM_INTEROP = FqName("io.realm.kotlin.internal.interop")
95102
val PACKAGE_REALM_INTERNAL = FqName("io.realm.kotlin.internal")
96103
val PACKAGE_MONGODB = FqName("io.realm.kotlin.mongodb")
97104
val PACKAGE_MONGODB_INTERNAL = FqName("io.realm.kotlin.mongodb.internal")
105+
val APP_CONFIGURATION_BUILDER = FqName("AppConfiguration.Builder")
98106
}
99107

100108
object ClassIds {
@@ -160,5 +168,5 @@ object ClassIds {
160168
val APP_IMPL = ClassId(PACKAGE_MONGODB_INTERNAL, Name.identifier("AppImpl"))
161169
val APP_CONFIGURATION = ClassId(PACKAGE_MONGODB, Name.identifier("AppConfiguration"))
162170
val APP_CONFIGURATION_IMPL = ClassId(PACKAGE_MONGODB_INTERNAL, Name.identifier("AppConfigurationImpl"))
163-
val APP_CONFIGURATION_BUILDER = ClassId(FqName("io.realm.kotlin.mongodb.AppConfiguration"), FqName("Builder"), true)
171+
val APP_CONFIGURATION_BUILDER = ClassId(PACKAGE_MONGODB, FqNames.APP_CONFIGURATION_BUILDER, false)
164172
}

packages/plugin-compiler/src/main/kotlin/io/realm/kotlin/compiler/IrUtils.kt

+45-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ import io.realm.kotlin.compiler.ClassIds.EMBEDDED_OBJECT_INTERFACE
2222
import io.realm.kotlin.compiler.ClassIds.KOTLIN_COLLECTIONS_LISTOF
2323
import io.realm.kotlin.compiler.ClassIds.PERSISTED_NAME_ANNOTATION
2424
import io.realm.kotlin.compiler.ClassIds.REALM_OBJECT_INTERFACE
25+
import io.realm.kotlin.compiler.FqNames.PACKAGE_TYPES
26+
import io.realm.kotlin.compiler.Names.ASYMMETRIC_REALM_OBJECT
27+
import io.realm.kotlin.compiler.Names.EMBEDDED_REALM_OBJECT
28+
import io.realm.kotlin.compiler.Names.REALM_OBJECT
2529
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
2630
import org.jetbrains.kotlin.backend.common.lower.DeclarationIrBuilder
2731
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocationWithRange
@@ -30,9 +34,15 @@ import org.jetbrains.kotlin.com.intellij.openapi.util.text.StringUtil
3034
import org.jetbrains.kotlin.com.intellij.psi.PsiElement
3135
import org.jetbrains.kotlin.com.intellij.psi.PsiElementVisitor
3236
import org.jetbrains.kotlin.descriptors.ClassDescriptor
37+
import org.jetbrains.kotlin.descriptors.ClassKind
3338
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
3439
import org.jetbrains.kotlin.descriptors.Modality
3540
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
41+
import org.jetbrains.kotlin.fir.symbols.SymbolInternals
42+
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
43+
import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef
44+
import org.jetbrains.kotlin.fir.types.FirUserTypeRef
45+
import org.jetbrains.kotlin.fir.types.classId
3646
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
3747
import org.jetbrains.kotlin.ir.builders.IrBlockBodyBuilder
3848
import org.jetbrains.kotlin.ir.builders.IrBlockBuilder
@@ -105,6 +115,7 @@ import org.jetbrains.kotlin.name.CallableId
105115
import org.jetbrains.kotlin.name.ClassId
106116
import org.jetbrains.kotlin.name.FqName
107117
import org.jetbrains.kotlin.name.Name
118+
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes
108119
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes.SUPER_TYPE_LIST
109120
import org.jetbrains.kotlin.resolve.DescriptorUtils
110121
import org.jetbrains.kotlin.types.KotlinType
@@ -141,10 +152,9 @@ val anyRealmObjectInterfacesFqNames = realmObjectInterfaceFqNames + realmEmbedde
141152

142153
fun IrType.classIdOrFail(): ClassId = getClass()?.classId ?: error("Can't get classId of ${render()}")
143154

144-
inline fun ClassDescriptor.hasInterfacePsi(interfaces: Set<String>): Boolean {
145-
// Using PSI to find super types to avoid cyclic reference (see https://github.com/realm/realm-kotlin/issues/339)
155+
inline fun PsiElement.hasInterface(interfaces: Set<String>): Boolean {
146156
var hasRealmObjectAsSuperType = false
147-
this.findPsi()?.acceptChildren(object : PsiElementVisitor() {
157+
this.acceptChildren(object : PsiElementVisitor() {
148158
override fun visitElement(element: PsiElement) {
149159
if (element.node.elementType == SUPER_TYPE_LIST) {
150160
// Check supertypes for classes with Embbeded/RealmObject as generics and remove
@@ -169,6 +179,10 @@ inline fun ClassDescriptor.hasInterfacePsi(interfaces: Set<String>): Boolean {
169179

170180
return hasRealmObjectAsSuperType
171181
}
182+
inline fun ClassDescriptor.hasInterfacePsi(interfaces: Set<String>): Boolean {
183+
// Using PSI to find super types to avoid cyclic reference (see https://github.com/realm/realm-kotlin/issues/339)
184+
return this.findPsi()?.hasInterface(interfaces) ?: false
185+
}
172186

173187
// Do to the way PSI works, it can be a bit tricky to uniquely identify when the Realm Kotlin
174188
// RealmObject interface is used. For that reason, once we have determined a match for RealmObject,
@@ -186,6 +200,34 @@ val ClassDescriptor.isEmbeddedRealmObject: Boolean
186200
val ClassDescriptor.isBaseRealmObject: Boolean
187201
get() = this.hasInterfacePsi(realmObjectPsiNames + embeddedRealmObjectPsiNames + asymmetricRealmObjectPsiNames) && !this.hasInterfacePsi(realmJavaObjectPsiNames)
188202

203+
val realmObjectTypes: Set<Name> = setOf(REALM_OBJECT, EMBEDDED_REALM_OBJECT, ASYMMETRIC_REALM_OBJECT)
204+
val realmObjectClassIds = realmObjectTypes.map { name -> ClassId(PACKAGE_TYPES, name) }
205+
206+
// This is the K2 equivalent of our PSI hack to determine if a symbol has a RealmObject base class.
207+
// There is currently no way to determine this within the resolved type system and there is
208+
// probably no such option around the corner.
209+
// https://kotlinlang.slack.com/archives/C03PK0PE257/p1694599154558669
210+
@OptIn(SymbolInternals::class)
211+
val FirClassSymbol<*>.isBaseRealmObject: Boolean
212+
get() = this.classKind == ClassKind.CLASS &&
213+
this.fir.superTypeRefs.any { typeRef ->
214+
when (typeRef) {
215+
// In SUPERTYPES stage
216+
is FirUserTypeRef -> {
217+
typeRef.qualifier.last().name in realmObjectTypes &&
218+
// Disregard constructor invocations as that means that it is a Realm Java class
219+
!(
220+
typeRef.source?.run { treeStructure.getParent(lighterASTNode) }
221+
?.tokenType?.let { it == KtStubElementTypes.CONSTRUCTOR_CALLEE }
222+
?: false
223+
)
224+
}
225+
// After SUPERTYPES stage
226+
is FirResolvedTypeRef -> typeRef.type.classId in realmObjectClassIds
227+
else -> false
228+
}
229+
}
230+
189231
// JetBrains already have a method `fun IrAnnotationContainer.hasAnnotation(symbol: IrClassSymbol)`
190232
// It is unclear exactly what the difference is and how to get a ClassSymbol from a ClassId,
191233
// so for now just work around it.

packages/plugin-compiler/src/main/kotlin/io/realm/kotlin/compiler/RealmModelSyntheticMethodsExtension.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class RealmModelSyntheticMethodsExtension : SyntheticResolveExtension {
5151
!isNestedInRealmModelClass(thisDescriptor) && /* do not override nested class methods */
5252
result.isEmpty() /* = no method has been declared in the current class */
5353
) {
54-
when (name.identifier) {
55-
"toString" -> {
54+
when (name) {
55+
Names.REALM_OBJECT_TO_STRING_METHOD -> {
5656
result.add(
5757
createMethod(
5858
classDescriptor = thisDescriptor,
@@ -62,7 +62,7 @@ class RealmModelSyntheticMethodsExtension : SyntheticResolveExtension {
6262
)
6363
)
6464
}
65-
"equals" -> {
65+
Names.REALM_OBJECT_EQUALS -> {
6666
result.add(
6767
createMethod(
6868
classDescriptor = thisDescriptor,
@@ -72,7 +72,7 @@ class RealmModelSyntheticMethodsExtension : SyntheticResolveExtension {
7272
)
7373
)
7474
}
75-
"hashCode" -> {
75+
Names.REALM_OBJECT_HASH_CODE -> {
7676
result.add(
7777
createMethod(
7878
classDescriptor = thisDescriptor,

0 commit comments

Comments
 (0)