Minor: use List instead of Array as container in chained scopes
This commit is contained in:
+4
-1
@@ -194,7 +194,10 @@ public abstract class AbstractJvmRuntimeDescriptorLoaderTest : TestCaseWithTmpdi
|
||||
private val scope: MemberScope
|
||||
|
||||
init {
|
||||
scope = ChainedMemberScope("synthetic package view for test", ScopeWithClassifiers(classes), *packageScopes.toTypedArray())
|
||||
val list = ArrayList<MemberScope>(packageScopes.size + 1)
|
||||
list.add(ScopeWithClassifiers(classes))
|
||||
list.addAll(packageScopes)
|
||||
scope = ChainedMemberScope("synthetic package view for test", list)
|
||||
}
|
||||
|
||||
override val fqName: FqName
|
||||
|
||||
@@ -54,6 +54,7 @@ import org.jetbrains.kotlin.tests.di.InjectionKt;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -104,10 +105,10 @@ public class TypeSubstitutorTest extends KotlinTestWithEnvironment {
|
||||
}
|
||||
});
|
||||
return new LexicalChainedScope(typeParameters, module, false, null, LexicalScopeKind.SYNTHETIC,
|
||||
new MemberScope[] {
|
||||
contextClass.getDefaultType().getMemberScope(),
|
||||
module.getBuiltIns().getBuiltInsPackageScope()
|
||||
});
|
||||
Arrays.asList(
|
||||
contextClass.getDefaultType().getMemberScope(),
|
||||
module.getBuiltIns().getBuiltInsPackageScope()
|
||||
));
|
||||
}
|
||||
|
||||
private void doTest(@Nullable String expectedTypeStr, String initialTypeStr, Pair<String, String>... substitutionStrs) {
|
||||
|
||||
Reference in New Issue
Block a user