Changed signatures
This commit is contained in:
@@ -47,11 +47,11 @@ public abstract class AbstractScopeAdapter : JetScope {
|
||||
return workerScope.getProperties(name)
|
||||
}
|
||||
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType, name: Name): Collection<VariableDescriptor> {
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType, name: Name): Collection<PropertyDescriptor> {
|
||||
return workerScope.getSyntheticExtensionProperties(receiverType, name)
|
||||
}
|
||||
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType): Collection<VariableDescriptor> {
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType): Collection<PropertyDescriptor> {
|
||||
return workerScope.getSyntheticExtensionProperties(receiverType)
|
||||
}
|
||||
|
||||
|
||||
@@ -65,10 +65,10 @@ public open class ChainedScope(
|
||||
override fun getFunctions(name: Name): Collection<FunctionDescriptor>
|
||||
= getFromAllScopes { it.getFunctions(name) }
|
||||
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType, name: Name): Collection<VariableDescriptor>
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType, name: Name): Collection<PropertyDescriptor>
|
||||
= getFromAllScopes { it.getSyntheticExtensionProperties(receiverType, name) }
|
||||
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType): Collection<VariableDescriptor>
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType): Collection<PropertyDescriptor>
|
||||
= getFromAllScopes { it.getSyntheticExtensionProperties(receiverType) }
|
||||
|
||||
override fun getImplicitReceiversHierarchy(): List<ReceiverParameterDescriptor> {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.jetbrains.kotlin.resolve.scopes
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.types.JetType
|
||||
import org.jetbrains.kotlin.utils.Printer
|
||||
@@ -36,9 +37,9 @@ public class FilteringScope(private val workerScope: JetScope, private val predi
|
||||
|
||||
override fun getProperties(name: Name) = workerScope.getProperties(name).filter(predicate)
|
||||
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType, name: Name) = workerScope.getSyntheticExtensionProperties(receiverType, name).filter(predicate)
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType, name: Name): Collection<PropertyDescriptor> = workerScope.getSyntheticExtensionProperties(receiverType, name).filter(predicate)
|
||||
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType) = workerScope.getSyntheticExtensionProperties(receiverType).filter(predicate)
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType): Collection<PropertyDescriptor> = workerScope.getSyntheticExtensionProperties(receiverType).filter(predicate)
|
||||
|
||||
override fun getLocalVariable(name: Name) = filterDescriptor(workerScope.getLocalVariable(name))
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ public trait JetScope {
|
||||
|
||||
public fun getFunctions(name: Name): Collection<FunctionDescriptor>
|
||||
|
||||
public fun getSyntheticExtensionProperties(receiverType: JetType, name: Name): Collection<VariableDescriptor>
|
||||
public fun getSyntheticExtensionProperties(receiverType: JetType, name: Name): Collection<PropertyDescriptor>
|
||||
|
||||
public fun getSyntheticExtensionProperties(receiverType: JetType): Collection<VariableDescriptor>
|
||||
public fun getSyntheticExtensionProperties(receiverType: JetType): Collection<PropertyDescriptor>
|
||||
|
||||
public fun getContainingDeclaration(): DeclarationDescriptor
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ public abstract class JetScopeImpl : JetScope {
|
||||
|
||||
override fun getFunctions(name: Name): Collection<FunctionDescriptor> = setOf()
|
||||
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType, name: Name): Collection<VariableDescriptor> = listOf()
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType, name: Name): Collection<PropertyDescriptor> = listOf()
|
||||
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType): Collection<VariableDescriptor> = listOf()
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType): Collection<PropertyDescriptor> = listOf()
|
||||
|
||||
override fun getDeclarationsByLabel(labelName: Name): Collection<DeclarationDescriptor> = listOf()
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.jetbrains.kotlin.resolve.scopes
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ReceiverParameterDescriptor
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.types.JetType
|
||||
@@ -69,9 +70,9 @@ public class SubstitutingScope(private val workerScope: JetScope, private val su
|
||||
|
||||
override fun getFunctions(name: Name) = substitute(workerScope.getFunctions(name))
|
||||
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType, name: Name) = substitute(workerScope.getSyntheticExtensionProperties(receiverType, name))
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType, name: Name): Collection<PropertyDescriptor> = substitute(workerScope.getSyntheticExtensionProperties(receiverType, name))
|
||||
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType) = substitute(workerScope.getSyntheticExtensionProperties(receiverType))
|
||||
override fun getSyntheticExtensionProperties(receiverType: JetType): Collection<PropertyDescriptor> = substitute(workerScope.getSyntheticExtensionProperties(receiverType))
|
||||
|
||||
override fun getPackage(name: Name) = workerScope.getPackage(name)
|
||||
|
||||
|
||||
@@ -88,12 +88,12 @@ public class ErrorUtils {
|
||||
@NotNull
|
||||
@Override
|
||||
public Set<VariableDescriptor> getProperties(@NotNull Name name) {
|
||||
return ERROR_PROPERTY_GROUP;
|
||||
return ERROR_VARIABLE_GROUP;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<VariableDescriptor> getSyntheticExtensionProperties(
|
||||
public Collection<PropertyDescriptor> getSyntheticExtensionProperties(
|
||||
@NotNull JetType receiverType, @NotNull Name name
|
||||
) {
|
||||
return ERROR_PROPERTY_GROUP;
|
||||
@@ -101,7 +101,7 @@ public class ErrorUtils {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<VariableDescriptor> getSyntheticExtensionProperties(@NotNull JetType receiverType) {
|
||||
public Collection<PropertyDescriptor> getSyntheticExtensionProperties(@NotNull JetType receiverType) {
|
||||
return ERROR_PROPERTY_GROUP;
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ public class ErrorUtils {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<VariableDescriptor> getSyntheticExtensionProperties(
|
||||
public Collection<PropertyDescriptor> getSyntheticExtensionProperties(
|
||||
@NotNull JetType receiverType, @NotNull Name name
|
||||
) {
|
||||
throw new IllegalStateException();
|
||||
@@ -217,7 +217,7 @@ public class ErrorUtils {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<VariableDescriptor> getSyntheticExtensionProperties(@NotNull JetType receiverType) {
|
||||
public Collection<PropertyDescriptor> getSyntheticExtensionProperties(@NotNull JetType receiverType) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
@@ -333,9 +333,10 @@ public class ErrorUtils {
|
||||
}
|
||||
|
||||
private static final JetType ERROR_PROPERTY_TYPE = createErrorType("<ERROR PROPERTY TYPE>");
|
||||
private static final VariableDescriptor ERROR_PROPERTY = createErrorProperty();
|
||||
private static final PropertyDescriptor ERROR_PROPERTY = createErrorProperty();
|
||||
|
||||
private static final Set<VariableDescriptor> ERROR_PROPERTY_GROUP = Collections.singleton(ERROR_PROPERTY);
|
||||
private static final Set<VariableDescriptor> ERROR_VARIABLE_GROUP = Collections.<VariableDescriptor>singleton(ERROR_PROPERTY);
|
||||
private static final Set<PropertyDescriptor> ERROR_PROPERTY_GROUP = Collections.singleton(ERROR_PROPERTY);
|
||||
|
||||
@NotNull
|
||||
private static PropertyDescriptorImpl createErrorProperty() {
|
||||
|
||||
Reference in New Issue
Block a user