mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
Remove KForeignMemberProperty and KClassOrigin, use KMemberPropertyImpl instead
This commit is contained in:
@@ -9,8 +9,8 @@ fun box(): String {
|
||||
val s = J::s
|
||||
|
||||
// Check that correct reflection objects are created
|
||||
assert(i.javaClass.getSimpleName() == "KForeignMemberProperty", "Fail i class")
|
||||
assert(s.javaClass.getSimpleName() == "KMutableForeignMemberProperty", "Fail s class")
|
||||
assert(i.javaClass.getSimpleName() == "KMemberPropertyImpl", "Fail i class")
|
||||
assert(s.javaClass.getSimpleName() == "KMutableMemberPropertyImpl", "Fail s class")
|
||||
|
||||
// Check that no Method objects are created for such properties
|
||||
assert(i.javaGetter == null, "Fail i getter")
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package test;
|
||||
|
||||
public class equalsHashCodeToString {
|
||||
public final boolean b;
|
||||
public char c;
|
||||
|
||||
public equalsHashCodeToString() {
|
||||
this.b = false;
|
||||
this.c = '0';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package test
|
||||
|
||||
import kotlin.test.*
|
||||
import test.equalsHashCodeToString as J
|
||||
|
||||
fun box(): String {
|
||||
assertEquals("val test.equalsHashCodeToString.b", (J::b).toString())
|
||||
assertEquals("var test.equalsHashCodeToString.c", (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"
|
||||
}
|
||||
Reference in New Issue
Block a user