Minor: remove the no longer needed function KtScope::getClassifier(Name)
This commit is contained in:
@@ -18,7 +18,6 @@ package org.jetbrains.kotlin.resolve.scopes
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.descriptors.*
|
import org.jetbrains.kotlin.descriptors.*
|
||||||
import org.jetbrains.kotlin.incremental.components.LookupLocation
|
import org.jetbrains.kotlin.incremental.components.LookupLocation
|
||||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
import org.jetbrains.kotlin.types.KotlinType
|
import org.jetbrains.kotlin.types.KotlinType
|
||||||
import org.jetbrains.kotlin.utils.Printer
|
import org.jetbrains.kotlin.utils.Printer
|
||||||
@@ -47,10 +46,6 @@ public interface KtScope {
|
|||||||
|
|
||||||
public fun getDeclarationsByLabel(labelName: Name): Collection<DeclarationDescriptor>
|
public fun getDeclarationsByLabel(labelName: Name): Collection<DeclarationDescriptor>
|
||||||
|
|
||||||
// Temporary overloads which will be dropped when all usages will be processed
|
|
||||||
@Deprecated("Provide `location` explicitly", replaceWith = ReplaceWith("getClassifier(name, NoLookupLocation.UNSORTED)"))
|
|
||||||
public fun getClassifier(name: Name): ClassifierDescriptor? = getClassifier(name, NoLookupLocation.UNSORTED)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All visible descriptors from current scope.
|
* All visible descriptors from current scope.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import org.jetbrains.kotlin.descriptors.impl.ConstructorDescriptorImpl;
|
|||||||
import org.jetbrains.kotlin.descriptors.impl.PropertyDescriptorImpl;
|
import org.jetbrains.kotlin.descriptors.impl.PropertyDescriptorImpl;
|
||||||
import org.jetbrains.kotlin.descriptors.impl.TypeParameterDescriptorImpl;
|
import org.jetbrains.kotlin.descriptors.impl.TypeParameterDescriptorImpl;
|
||||||
import org.jetbrains.kotlin.incremental.components.LookupLocation;
|
import org.jetbrains.kotlin.incremental.components.LookupLocation;
|
||||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation;
|
|
||||||
import org.jetbrains.kotlin.name.FqName;
|
import org.jetbrains.kotlin.name.FqName;
|
||||||
import org.jetbrains.kotlin.name.Name;
|
import org.jetbrains.kotlin.name.Name;
|
||||||
import org.jetbrains.kotlin.platform.PlatformToKotlinClassMap;
|
import org.jetbrains.kotlin.platform.PlatformToKotlinClassMap;
|
||||||
@@ -155,15 +154,7 @@ public class ErrorUtils {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static abstract class AbstractErrorScope implements KtScope {
|
public static class ErrorScope implements KtScope {
|
||||||
@Nullable
|
|
||||||
@Override
|
|
||||||
public ClassifierDescriptor getClassifier(@NotNull Name name) {
|
|
||||||
return getClassifier(name, NoLookupLocation.UNSORTED);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class ErrorScope extends AbstractErrorScope {
|
|
||||||
private final String debugMessage;
|
private final String debugMessage;
|
||||||
|
|
||||||
private ErrorScope(@NotNull String debugMessage) {
|
private ErrorScope(@NotNull String debugMessage) {
|
||||||
@@ -279,7 +270,7 @@ public class ErrorUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class ThrowingScope extends AbstractErrorScope {
|
private static class ThrowingScope implements KtScope {
|
||||||
private final String debugMessage;
|
private final String debugMessage;
|
||||||
|
|
||||||
private ThrowingScope(@NotNull String message) {
|
private ThrowingScope(@NotNull String message) {
|
||||||
@@ -683,7 +674,7 @@ public class ErrorUtils {
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public TypeCapabilities getCapabilities() {
|
public TypeCapabilities getCapabilities() {
|
||||||
return TypeCapabilities.NONE.INSTANCE$;
|
return TypeCapabilities.NONE.INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user