Fix: constraint T? >: Int! should transform to T >: Int
This commit is contained in:
@@ -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!
|
||||
}
|
||||
Reference in New Issue
Block a user