23e7468e57
Before this commit, we cached such IR properties by FIR property which was created by Java field each time when we referenced it. This led to signature clashes. Now we cache such IR properties directly by associated FIR field.
34 lines
577 B
Kotlin
Vendored
34 lines
577 B
Kotlin
Vendored
// WITH_REFLECT
|
|
// FILE: test/J.java
|
|
|
|
package test;
|
|
|
|
public class J {
|
|
public final boolean b;
|
|
public char c;
|
|
|
|
public J() {
|
|
this.b = false;
|
|
this.c = '0';
|
|
}
|
|
}
|
|
|
|
// FILE: 1.kt
|
|
|
|
package test
|
|
|
|
import kotlin.test.*
|
|
|
|
fun box(): String {
|
|
assertEquals("val test.J.b: kotlin.Boolean", (J::b).toString())
|
|
assertEquals("var test.J.c: kotlin.Char", (J::c).toString())
|
|
|
|
assertTrue(J::b == J::b)
|
|
assertFalse(J::c == J::b)
|
|
|
|
assertTrue(J::b.hashCode() == J::b.hashCode())
|
|
assertFalse(J::b.hashCode() == J::c.hashCode())
|
|
|
|
return "OK"
|
|
}
|