Add a test with false positive "inferred into empty intersection"
Related to KT-50232
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
fun test() {
|
||||
acceptMyRecursive(<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION!>inferType<!><<!UPPER_BOUND_VIOLATED!>MyRecursive?<!>>())
|
||||
}
|
||||
|
||||
fun acceptMyRecursive(value: MyRecursive?) {}
|
||||
|
||||
fun <R : Recursive<R>?> inferType(): R = TODO()
|
||||
|
||||
abstract class Recursive<R>
|
||||
|
||||
class MyRecursive : Recursive<MyRecursive>()
|
||||
@@ -0,0 +1,11 @@
|
||||
fun test() {
|
||||
acceptMyRecursive(<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING!>inferType<!><<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>MyRecursive?<!>>())
|
||||
}
|
||||
|
||||
fun acceptMyRecursive(value: MyRecursive?) {}
|
||||
|
||||
fun <R : Recursive<R>?> inferType(): R = TODO()
|
||||
|
||||
abstract class Recursive<R>
|
||||
|
||||
class MyRecursive : Recursive<MyRecursive>()
|
||||
@@ -0,0 +1,19 @@
|
||||
package
|
||||
|
||||
public fun acceptMyRecursive(/*0*/ value: MyRecursive?): kotlin.Unit
|
||||
public fun </*0*/ R : Recursive<R>?> inferType(): R
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public final class MyRecursive : Recursive<MyRecursive> {
|
||||
public constructor MyRecursive()
|
||||
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
|
||||
}
|
||||
|
||||
public abstract class Recursive</*0*/ R> {
|
||||
public constructor Recursive</*0*/ R>()
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user