compiler-plugin / arrow.meta.dsl.resolve / ResolveSyntax / syntheticScopes

syntheticScopes

open fun syntheticScopes(syntheticConstructor: CompilerContext.(constructor: ConstructorDescriptor) -> ConstructorDescriptor? = Noop.nullable2(), syntheticConstructors: CompilerContext.(classifierDescriptors: Collection<DeclarationDescriptor>) -> Collection<FunctionDescriptor> = Noop.emptyCollection2(), syntheticConstructorsForName: CompilerContext.(contributedClassifier: ClassifierDescriptor, location: LookupLocation) -> Collection<FunctionDescriptor> = Noop.emptyCollection3(), syntheticExtensionProperties: CompilerContext.(receiverTypes: Collection<KotlinType>, location: LookupLocation) -> Collection<PropertyDescriptor> = Noop.emptyCollection3(), syntheticExtensionPropertiesForName: CompilerContext.(receiverTypes: Collection<KotlinType>, name: Name, location: LookupLocation) -> Collection<PropertyDescriptor> = Noop.emptyCollection4(), syntheticMemberFunctions: CompilerContext.(receiverTypes: Collection<KotlinType>) -> Collection<FunctionDescriptor> = Noop.emptyCollection2(), syntheticMemberFunctionsForName: CompilerContext.(receiverTypes: Collection<KotlinType>, name: Name, location: LookupLocation) -> Collection<FunctionDescriptor> = Noop.emptyCollection4(), syntheticStaticFunctions: CompilerContext.(functionDescriptors: Collection<DeclarationDescriptor>) -> Collection<FunctionDescriptor> = Noop.emptyCollection2(), syntheticStaticFunctionsForName: CompilerContext.(contributedFunctions: Collection<FunctionDescriptor>, location: LookupLocation) -> Collection<FunctionDescriptor> = Noop.emptyCollection3()): ExtensionPhase

The syntheticScopes function encapsulates a powerful interface that lets you peak and modify the resolution scope of constructors, extension functions, properties, and static functions. Altering the synthetic scope, we can provide our own descriptors to IntelliJ. These descriptors are required for IntelliJ IDEA to enable synthetic generated code required by IDE features such as autocompletion and code refactoring.

Do you like Arrow?

Arrow Org
<