Move SAM adapters from static scope to synthetic one
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,6 +27,8 @@ interface SyntheticScope {
|
||||
fun getSyntheticExtensionProperties(receiverTypes: Collection<KotlinType>, name: Name, location: LookupLocation): Collection<PropertyDescriptor>
|
||||
fun getSyntheticMemberFunctions(receiverTypes: Collection<KotlinType>, name: Name, location: LookupLocation): Collection<FunctionDescriptor>
|
||||
|
||||
fun getSyntheticStaticFunctions(scope: ResolutionScope, name: Name, location: LookupLocation): Collection<FunctionDescriptor>
|
||||
|
||||
fun getSyntheticExtensionProperties(receiverTypes: Collection<KotlinType>): Collection<PropertyDescriptor>
|
||||
fun getSyntheticMemberFunctions(receiverTypes: Collection<KotlinType>): Collection<FunctionDescriptor>
|
||||
}
|
||||
@@ -46,6 +48,9 @@ fun SyntheticScopes.collectSyntheticExtensionProperties(receiverTypes: Collectio
|
||||
fun SyntheticScopes.collectSyntheticMemberFunctions(receiverTypes: Collection<KotlinType>, name: Name, location: LookupLocation)
|
||||
= scopes.flatMap { it.getSyntheticMemberFunctions(receiverTypes, name, location) }
|
||||
|
||||
fun SyntheticScopes.collectSyntheticStaticFunctions(scope: ResolutionScope, name: Name, location: LookupLocation)
|
||||
= scopes.flatMap { it.getSyntheticStaticFunctions(scope, name, location) }
|
||||
|
||||
fun SyntheticScopes.collectSyntheticExtensionProperties(receiverTypes: Collection<KotlinType>)
|
||||
= scopes.flatMap { it.getSyntheticExtensionProperties(receiverTypes) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user