use of org.jetbrains.kotlin.codegen.context.RootContext in project kotlin by JetBrains.
the class JvmCodegenUtil method isCallInsideSameModuleAsDeclared.
public static boolean isCallInsideSameModuleAsDeclared(@NotNull CallableMemberDescriptor declarationDescriptor, @NotNull CodegenContext context, @Nullable File outDirectory) {
if (context instanceof RootContext) {
return true;
}
DeclarationDescriptor contextDescriptor = context.getContextDescriptor();
CallableMemberDescriptor directMember = getDirectMember(declarationDescriptor);
if (directMember instanceof DeserializedCallableMemberDescriptor) {
return ModuleVisibilityUtilsKt.isContainedByCompiledPartOfOurModule(directMember, outDirectory);
} else {
return DescriptorUtils.areInSameModule(directMember, contextDescriptor);
}
}
Aggregations