Fix: constraint T? >: Int! should transform to T >: Int

This commit is contained in:
Svetlana Isakova
2015-01-28 18:51:55 +03:00
parent f5fb3246ae
commit a2f03f2d52
4 changed files with 45 additions and 3 deletions
@@ -0,0 +1,20 @@
// !CHECK_TYPE
// FILE: A.java
public class A {
public static String foo() {
return "";
}
}
// FILE: b.kt
fun <T: Any> exclExcl(t: T?): T = t!!
fun test11() {
// not 'String!'
exclExcl(A.foo()) checkType { it : _<String> }
exclExcl(A.foo()) checkType { <!TYPE_MISMATCH!>it<!> : _<String?> }
// not 'String!'
A.foo()!! checkType { it : _<String> }
A.foo()!! checkType { <!TYPE_MISMATCH!>it<!> : _<String?> }
}
@@ -0,0 +1,14 @@
package
internal fun </*0*/ T : kotlin.Any> exclExcl(/*0*/ t: T?): T
internal fun test11(): kotlin.Unit
public open class A {
public constructor A()
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
// Static members
public open fun foo(): kotlin.String!
}