KT-15574 Can't instantiate Array through Type Alias

Array instatiation code should handle type alias constructors properly.

So far, we don't have constructors with type parameters
different from the type parameters of the resulting type,
so we can safely take type arguments of the underlying type.
This commit is contained in:
Dmitry Petrov
2017-02-01 12:27:42 +03:00
parent f5a431490c
commit 7600f89f0b
9 changed files with 120 additions and 1 deletions
@@ -21771,6 +21771,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
doTest(fileName);
}
@TestMetadata("genericTypeAliasConstructor2.kt")
public void testGenericTypeAliasConstructor2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor2.kt");
doTest(fileName);
}
@TestMetadata("innerClassTypeAliasConstructor.kt")
public void testInnerClassTypeAliasConstructor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructor.kt");
@@ -21813,6 +21819,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
doTest(fileName);
}
@TestMetadata("typeAliasConstructorForArray.kt")
public void testTypeAliasConstructorForArray() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt");
doTest(fileName);
}
@TestMetadata("typeAliasConstructorInSuperCall.kt")
public void testTypeAliasConstructorInSuperCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt");