KT-14498: Properly check variance in expanded types.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// !DIAGNOSTICS_NUMBER: 1
|
||||
// !DIAGNOSTICS: TYPE_VARIANCE_CONFLICT_IN_EXPANDED_TYPE
|
||||
// !MESSAGE_TYPE: TEXT
|
||||
|
||||
interface InvOut<T1, out T2>
|
||||
|
||||
typealias AInvOut<T1, T2> = InvOut<T1, T2>
|
||||
typealias AInvOutTT<T> = AInvOut<T, T>
|
||||
|
||||
class Test<out S> : AInvOutTT<S>
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- typeVarianceConflictInTypeAliasExpansion1 -->
|
||||
Type parameter S is declared as 'out' but occurs in 'invariant' position in abbreviated type AInvOutTT<S> /* = InvOut<S, out S> */
|
||||
Reference in New Issue
Block a user