Refine subtyping check: pay attention to corresponding supertype nullability

F: Any, T : F? => !isSubtype(T, Any)

It helps to identify upper bounds violation like in KT-7455

 #KT-7455 Fixed
 #KT-2924 Fixed
 #KT-3015 Fixed
This commit is contained in:
Denis Zharkov
2015-08-26 11:22:40 +03:00
parent a906be6dd7
commit 6ecfa6e985
11 changed files with 184 additions and 3 deletions
@@ -0,0 +1,12 @@
package
internal fun </*0*/ F : kotlin.String?> bar(/*0*/ x: F): kotlin.Unit
internal fun </*0*/ E : kotlin.CharSequence> foo1(/*0*/ x: E): kotlin.Unit
internal fun </*0*/ E : kotlin.CharSequence> E.foo2(): kotlin.Unit
internal final class A</*0*/ T : kotlin.CharSequence> {
public constructor A</*0*/ T : kotlin.CharSequence>(/*0*/ x: T)
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}