Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace usage of java.lang.Class with kotlin.reflect.KClass #557

Closed

Conversation

veyndan
Copy link
Contributor

@veyndan veyndan commented Jun 5, 2023

When generating an equals method from commonMain code, Studio suggests the usage of if (other == null || this::class != other::class) return false instead of if (javaClass != other?.javaClass) return false. I'm just calling this out because of the following line:

// Do not edit. Implementation generated by Studio, since data class uses referential equality
// for IntArray.
override fun equals(other: Any?): Boolean {
if (this === other) return true

Test: ./gradlew test connectedCheck
Bug: 270612487

@dlam dlam requested a review from claraf3 June 6, 2023 19:27
@veyndan veyndan deleted the 270612487/rm-javaClass branch June 29, 2023 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants