Remove dependency of "descriptors" on ContainerUtil
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.jetbrains.jet.lang.descriptors.impl;
|
||||
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
@@ -25,6 +24,7 @@ import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.lang.resolve.scopes.JetScopeImpl;
|
||||
import org.jetbrains.jet.utils.Printer;
|
||||
import org.jetbrains.jet.utils.UtilsPackage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -56,7 +56,7 @@ public class SubpackagesScope extends JetScopeImpl {
|
||||
Collection<FqName> subFqNames = packageView.getModule().getPackageFragmentProvider().getSubPackagesOf(packageView.getFqName());
|
||||
List<DeclarationDescriptor> result = new ArrayList<DeclarationDescriptor>(subFqNames.size());
|
||||
for (FqName subFqName : subFqNames) {
|
||||
ContainerUtil.addIfNotNull(result, getPackage(subFqName.shortName()));
|
||||
UtilsPackage.addIfNotNull(result, getPackage(subFqName.shortName()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.jetbrains.jet.lang.resolve;
|
||||
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import kotlin.Function1;
|
||||
import kotlin.KotlinPackage;
|
||||
import kotlin.Unit;
|
||||
@@ -40,10 +39,10 @@ import static org.jetbrains.jet.lang.resolve.OverridingUtil.OverrideCompatibilit
|
||||
public class OverridingUtil {
|
||||
|
||||
private static final List<ExternalOverridabilityCondition> EXTERNAL_CONDITIONS =
|
||||
ContainerUtil.collect(ServiceLoader.load(
|
||||
KotlinPackage.toList(ServiceLoader.load(
|
||||
ExternalOverridabilityCondition.class,
|
||||
ExternalOverridabilityCondition.class.getClassLoader()).iterator()
|
||||
);
|
||||
ExternalOverridabilityCondition.class.getClassLoader()
|
||||
));
|
||||
|
||||
public static final OverridingUtil DEFAULT = new OverridingUtil(new JetTypeChecker.TypeConstructorEquality() {
|
||||
@Override
|
||||
|
||||
+3
-3
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.jetbrains.jet.lang.resolve.calls.inference;
|
||||
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import kotlin.Function1;
|
||||
import kotlin.KotlinPackage;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -25,6 +24,7 @@ import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.constants.IntegerValueTypeConstructor;
|
||||
import org.jetbrains.jet.lang.types.*;
|
||||
import org.jetbrains.jet.lang.types.checker.JetTypeChecker;
|
||||
import org.jetbrains.jet.utils.UtilsPackage;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -172,7 +172,7 @@ public class TypeBoundsImpl implements TypeBounds {
|
||||
if (tryPossibleAnswer(superTypeOfLowerBounds)) {
|
||||
return Collections.singleton(superTypeOfLowerBounds);
|
||||
}
|
||||
ContainerUtil.addIfNotNull(superTypeOfLowerBounds, values);
|
||||
UtilsPackage.addIfNotNull(values, superTypeOfLowerBounds);
|
||||
|
||||
//todo
|
||||
//fun <T> foo(t: T, consumer: Consumer<T>): T
|
||||
@@ -182,7 +182,7 @@ public class TypeBoundsImpl implements TypeBounds {
|
||||
if (tryPossibleAnswer(superTypeOfNumberLowerBounds)) {
|
||||
return Collections.singleton(superTypeOfNumberLowerBounds);
|
||||
}
|
||||
ContainerUtil.addIfNotNull(superTypeOfNumberLowerBounds, values);
|
||||
UtilsPackage.addIfNotNull(values, superTypeOfNumberLowerBounds);
|
||||
|
||||
if (superTypeOfLowerBounds != null && superTypeOfNumberLowerBounds != null) {
|
||||
JetType superTypeOfAllLowerBounds = CommonSupertypes.commonSupertypeForNonDenotableTypes(
|
||||
|
||||
Reference in New Issue
Block a user