Refine return type of MemberScope.getContributedFunctions

This commit is contained in:
Denis Zharkov
2016-03-11 15:50:21 +03:00
parent 50d258e7f4
commit 78c9dffe00
26 changed files with 81 additions and 63 deletions
@@ -138,7 +138,7 @@ class LazyJavaPackageScope(
return deserializedPackageScope.getContributedVariables(name, NoLookupLocation.FOR_ALREADY_TRACKED)
}
override fun getContributedFunctions(name: Name, location: LookupLocation): List<FunctionDescriptor> {
override fun getContributedFunctions(name: Name, location: LookupLocation): List<SimpleFunctionDescriptor> {
// We should track lookups here because this scope can be used for kotlin packages too (if it doesn't contain toplevel properties nor functions).
recordLookup(name, location)
return deserializedPackageScope.getContributedFunctions(name, NoLookupLocation.FOR_ALREADY_TRACKED) + super.getContributedFunctions(name, NoLookupLocation.FOR_ALREADY_TRACKED)
@@ -72,7 +72,7 @@ abstract class LazyJavaScope(protected val c: LazyJavaResolverContext) : MemberS
protected abstract fun getDispatchReceiverParameter(): ReceiverParameterDescriptor?
private val functions = c.storageManager.createMemoizedFunction<Name, Collection<FunctionDescriptor>> {
private val functions = c.storageManager.createMemoizedFunction<Name, Collection<SimpleFunctionDescriptor>> {
name ->
val result = LinkedHashSet<SimpleFunctionDescriptor>()
@@ -214,7 +214,7 @@ abstract class LazyJavaScope(protected val c: LazyJavaResolverContext) : MemberS
return ResolvedValueParameters(descriptors, synthesizedNames)
}
override fun getContributedFunctions(name: Name, location: LookupLocation): Collection<FunctionDescriptor> {
override fun getContributedFunctions(name: Name, location: LookupLocation): Collection<SimpleFunctionDescriptor> {
recordLookup(name, location)
return functions(name)
}