[NI] Create error type for CST of error types
KT-36092 Fixed
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNCHECKED_CAST
|
||||
|
||||
class Foo<T>
|
||||
class Bar<S>
|
||||
|
||||
fun <T> consume(x: Foo<out T>, y: Foo<out T>) {}
|
||||
fun <T> materialize() = null as T
|
||||
|
||||
fun test() {
|
||||
consume(
|
||||
materialize<Foo<Bar<ErrorType>>>(),
|
||||
materialize<Foo<Bar<ErrorType>>>()
|
||||
)
|
||||
|
||||
<!INAPPLICABLE_CANDIDATE!>consume<!>(
|
||||
materialize<Foo<Bar<ErrorType>>>(),
|
||||
materialize<Foo<ErrorType>>()
|
||||
)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNCHECKED_CAST
|
||||
|
||||
class Foo<T>
|
||||
class Bar<S>
|
||||
|
||||
fun <T> consume(x: Foo<out T>, y: Foo<out T>) {}
|
||||
fun <T> materialize() = null as T
|
||||
|
||||
fun test() {
|
||||
consume(
|
||||
materialize<Foo<Bar<<!UNRESOLVED_REFERENCE!>ErrorType<!>>>>(),
|
||||
materialize<Foo<Bar<<!UNRESOLVED_REFERENCE!>ErrorType<!>>>>()
|
||||
)
|
||||
|
||||
consume(
|
||||
materialize<Foo<Bar<<!UNRESOLVED_REFERENCE!>ErrorType<!>>>>(),
|
||||
materialize<Foo<<!UNRESOLVED_REFERENCE!>ErrorType<!>>>()
|
||||
)
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T> consume(/*0*/ x: Foo<out T>, /*1*/ y: Foo<out T>): kotlin.Unit
|
||||
public fun </*0*/ T> materialize(): T
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public final class Bar</*0*/ S> {
|
||||
public constructor Bar</*0*/ S>()
|
||||
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 final class Foo</*0*/ T> {
|
||||
public constructor Foo</*0*/ 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
|
||||
}
|
||||
Reference in New Issue
Block a user