Search in sources :

Example 6 with ModuleDescriptorImpl

use of org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl in project kotlin by JetBrains.

the class KotlinTypeCheckerTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    ModuleDescriptorImpl module = KotlinTestUtils.createEmptyModule();
    builtIns = module.getBuiltIns();
    ContainerForTests container = InjectionKt.createContainerForTests(getProject(), module);
    module.setDependencies(Collections.singletonList(module));
    module.initialize(PackageFragmentProvider.Empty.INSTANCE);
    typeResolver = container.getTypeResolver();
    expressionTypingServices = container.getExpressionTypingServices();
    scopeWithImports = getDeclarationsScope("compiler/testData/type-checker-test.kt");
}
Also used : ContainerForTests(org.jetbrains.kotlin.tests.di.ContainerForTests) ModuleDescriptorImpl(org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl)

Aggregations

ModuleDescriptorImpl (org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl)6 NotNull (org.jetbrains.annotations.NotNull)3 InputStream (java.io.InputStream)2 PackageFragmentProvider (org.jetbrains.kotlin.descriptors.PackageFragmentProvider)2 ContainerForTests (org.jetbrains.kotlin.tests.di.ContainerForTests)2 ArrayList (java.util.ArrayList)1 BuiltInsPackageFragmentProviderKt.createBuiltInPackageFragmentProvider (org.jetbrains.kotlin.builtins.BuiltInsPackageFragmentProviderKt.createBuiltInPackageFragmentProvider)1 BuiltInFictitiousFunctionClassFactory (org.jetbrains.kotlin.builtins.functions.BuiltInFictitiousFunctionClassFactory)1 KtExpression (org.jetbrains.kotlin.psi.KtExpression)1 CompilerDeserializationConfiguration (org.jetbrains.kotlin.resolve.CompilerDeserializationConfiguration)1 LexicalScopeImpl (org.jetbrains.kotlin.resolve.scopes.LexicalScopeImpl)1 JsModuleDescriptor (org.jetbrains.kotlin.serialization.js.JsModuleDescriptor)1 LockBasedStorageManager (org.jetbrains.kotlin.storage.LockBasedStorageManager)1 KotlinType (org.jetbrains.kotlin.types.KotlinType)1 ExpressionTypingContext (org.jetbrains.kotlin.types.expressions.ExpressionTypingContext)1 KotlinJavascriptMetadata (org.jetbrains.kotlin.utils.KotlinJavascriptMetadata)1 Assert.assertNotNull (org.junit.Assert.assertNotNull)1