Equality for flexible types

This commit is contained in:
Andrey Breslav
2014-07-01 20:51:53 +04:00
parent a39d2bc24f
commit 549df3c0eb
6 changed files with 19 additions and 5 deletions
@@ -18,6 +18,6 @@ public class Y extends X<String> {
fun main() {
Y().fooN() : Any
Y().barN(<!NULL_FOR_NONNULL_TYPE!>null<!>);
Y().barN(null);
}
@@ -18,6 +18,6 @@ public class Y extends X<A> {
fun main() {
Y().fooN() : Any
Y().barN(<!NULL_FOR_NONNULL_TYPE!>null<!>);
Y().barN(null);
}
@@ -15,7 +15,7 @@ public class Y extends X<String> {
// FILE: test.kt
fun main() {
Y().foo()<!UNSAFE_CALL!>.<!>length
Y().foo().length
Y().bar(null)
}
@@ -9,5 +9,5 @@ package a
fun foo() {
// If this fails, it means that we have broken the rule that Java returns are always nullable
a.Test<Int>().t() <!UNSAFE_INFIX_CALL!>+<!> 1
a.Test<Int>().t() + 1
}
@@ -13,5 +13,5 @@ package d
import a.C
fun test() {
C.create()<!UNSAFE_CALL!>.<!>foo()
C.create().foo()
}