KT-14498: Properly check variance in expanded types.

This commit is contained in:
Dmitry Petrov
2016-10-27 16:28:34 +03:00
parent 49bf1e5917
commit ed60674d13
14 changed files with 234 additions and 59 deletions
@@ -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> */