Search in sources :

Example 1 with ReceiverParameterDescriptorImpl

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

the class KotlinTypeCheckerTest method assertType.

private void assertType(String contextType, String expression, String expectedType) {
    KotlinType thisType = makeType(contextType);
    ReceiverParameterDescriptorImpl receiverParameterDescriptor = new ReceiverParameterDescriptorImpl(scopeWithImports.getOwnerDescriptor(), new TransientReceiver(thisType));
    LexicalScope scope = new LexicalScopeImpl(scopeWithImports, scopeWithImports.getOwnerDescriptor(), false, receiverParameterDescriptor, LexicalScopeKind.SYNTHETIC);
    assertType(scope, expression, expectedType);
}
Also used : LexicalScope(org.jetbrains.kotlin.resolve.scopes.LexicalScope) LexicalScopeImpl(org.jetbrains.kotlin.resolve.scopes.LexicalScopeImpl) TransientReceiver(org.jetbrains.kotlin.resolve.scopes.receivers.TransientReceiver) ReceiverParameterDescriptorImpl(org.jetbrains.kotlin.descriptors.impl.ReceiverParameterDescriptorImpl)

Aggregations

ReceiverParameterDescriptorImpl (org.jetbrains.kotlin.descriptors.impl.ReceiverParameterDescriptorImpl)1 LexicalScope (org.jetbrains.kotlin.resolve.scopes.LexicalScope)1 LexicalScopeImpl (org.jetbrains.kotlin.resolve.scopes.LexicalScopeImpl)1 TransientReceiver (org.jetbrains.kotlin.resolve.scopes.receivers.TransientReceiver)1