Prohibit use of captured type as argument for reified parameter
#KT-8093 Fixed
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
class A<F>
|
||||
|
||||
inline fun <reified T> foo(x: A<T>) {}
|
||||
|
||||
fun test(x: A<out CharSequence>) {
|
||||
<!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo<!>(x)
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package
|
||||
|
||||
public inline fun </*0*/ reified T> foo(/*0*/ x: A<T>): kotlin.Unit
|
||||
public fun test(/*0*/ x: A<out kotlin.CharSequence>): kotlin.Unit
|
||||
|
||||
public final class A</*0*/ F> {
|
||||
public constructor A</*0*/ F>()
|
||||
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