Fix test in JDK independent way

This commit is contained in:
Mikhael Bogdanov
2018-10-18 15:43:18 +02:00
parent a4206a543a
commit ce1d6e7217
2 changed files with 9 additions and 8 deletions
@@ -18,7 +18,7 @@ fun box(): String {
if (b1.hashCode() == b2.hashCode()) return "Fail 1"
if (b1.equals(b2)) return "Fail 2"
val anno = C::class.java.annotations.first() as Anno
val anno = C::class.java.annotations.filterIsInstance<Anno>().first()
val c1 = C(anno)
val c2 = C(anno)
if (c1.hashCode() != c2.hashCode()) return "Fail 3"