[Commonizer] Restore TypeAliasCommonizer's Commutative property & TypeAliasTypeCommonizer: substitute underlying-type arguments
^KT-47574 The fix done here supports only one level of substituting underlying type-arguments. HierarchicalTypeAliasCommonizationTest.`KT-47574 - test long typealias chain` will assert proper behaviour for nested chains.
This commit is contained in:
committed by
Space
parent
448302d19b
commit
5b5dddc2d1
Vendored
+3
-1
@@ -6,7 +6,9 @@ typealias C2 = C // TA lifted up as is
|
||||
typealias C3 = C2 // TA lifted up as is
|
||||
|
||||
typealias D = A // class/TA expanded to the same class at the RHS
|
||||
typealias E = B // different TAs use common type from TA-chain
|
||||
typealias D2 = A // class/TA expanded to the same class at the RHS
|
||||
typealias E = A // different TAs use common type from TA-chain
|
||||
typealias E2 = A // different TAs use common type from TA-chain
|
||||
|
||||
typealias F = List<String> // parameterized type at the RHS
|
||||
typealias H<T> = List<T> // TA with own parameters
|
||||
|
||||
Vendored
+2
@@ -7,7 +7,9 @@ typealias C2 = C // TA lifted up as is
|
||||
typealias C3 = C2 // TA lifted up as is
|
||||
|
||||
typealias D = B // class/TA expanded to the same class at the RHS
|
||||
typealias D2 = A //class/TA expanded to the same class at RHS
|
||||
typealias E = C // different TAs use common type from TA-chain
|
||||
typealias E2 = B
|
||||
|
||||
typealias F = List<String> // parameterized type at the RHS
|
||||
typealias G = List<Int> // different parameterized types at the RHS
|
||||
|
||||
Vendored
+2
@@ -7,7 +7,9 @@ typealias C2 = C // TA lifted up as is
|
||||
typealias C3 = C2 // TA lifted up as is
|
||||
|
||||
typealias D = A // class/TA expanded to the same class at the RHS
|
||||
typealias D2 = B
|
||||
typealias E = B // different TAs use common type from TA-chain
|
||||
typealias E2 = C
|
||||
|
||||
typealias F = List<String> // parameterized type at the RHS
|
||||
typealias G = List<String> // different parameterized types at the RHS
|
||||
|
||||
Reference in New Issue
Block a user