use of org.jetbrains.kotlin.resolve.MultiTargetPlatform in project kotlin by JetBrains.
the class CheckerTestUtil method getDiagnosticsIncludingSyntaxErrors.
@NotNull
public static List<ActualDiagnostic> getDiagnosticsIncludingSyntaxErrors(@NotNull BindingContext bindingContext, @NotNull List<Pair<MultiTargetPlatform, BindingContext>> implementingModulesBindings, @NotNull PsiElement root, boolean markDynamicCalls, @Nullable List<DeclarationDescriptor> dynamicCallDescriptors) {
List<ActualDiagnostic> result = getDiagnosticsIncludingSyntaxErrors(bindingContext, root, markDynamicCalls, dynamicCallDescriptors, null);
List<Pair<MultiTargetPlatform, BindingContext>> sortedBindings = CollectionsKt.sortedWith(implementingModulesBindings, new Comparator<Pair<MultiTargetPlatform, BindingContext>>() {
@Override
public int compare(Pair<MultiTargetPlatform, BindingContext> o1, Pair<MultiTargetPlatform, BindingContext> o2) {
return o1.getFirst().compareTo(o2.getFirst());
}
});
for (Pair<MultiTargetPlatform, BindingContext> binding : sortedBindings) {
MultiTargetPlatform platform = binding.getFirst();
assert platform instanceof MultiTargetPlatform.Specific : "Implementing module must have a specific platform: " + platform;
result.addAll(getDiagnosticsIncludingSyntaxErrors(binding.getSecond(), root, markDynamicCalls, dynamicCallDescriptors, ((MultiTargetPlatform.Specific) platform).getPlatform()));
}
return result;
}
Aggregations