Remove KForeignMemberProperty and KClassOrigin, use KMemberPropertyImpl instead

This commit is contained in:
Alexander Udalov
2015-02-20 19:22:30 +03:00
parent ff0044f66a
commit fdfd808d80
8 changed files with 69 additions and 128 deletions

View File

@@ -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")

View File

@@ -0,0 +1,11 @@
package test;
public class equalsHashCodeToString {
public final boolean b;
public char c;
public equalsHashCodeToString() {
this.b = false;
this.c = '0';
}
}

View File

@@ -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"
}