Replace function MemberScope.getContainingDeclaration() to property ownerDescriptor

This commit is contained in:
Stanislav Erokhin
2015-11-04 15:29:33 +03:00
parent 52dc23012f
commit c4582d0e0c
32 changed files with 86 additions and 90 deletions
@@ -39,7 +39,7 @@ public object SamConversionResolverImpl : SamConversionResolver {
override fun resolveSamConstructor(name: Name, scope: MemberScope, location: LookupLocation): SamConstructorDescriptor? {
val classifier = scope.getContributedClassifier(name, location) as? LazyJavaClassDescriptor ?: return null
if (classifier.getFunctionTypeForSamInterface() == null) return null
return SingleAbstractMethodUtils.createSamConstructorFunction(scope.getContainingDeclaration(), classifier)
return SingleAbstractMethodUtils.createSamConstructorFunction(scope.ownerDescriptor, classifier)
}
@Suppress("UNCHECKED_CAST")
@@ -67,7 +67,7 @@ class PropagationHeuristics {
arrayTypeFromSuper.getConstructor(),
arrayTypeFromSuper.isMarkedNullable(),
Arrays.asList(new TypeProjectionImpl(Variance.OUT_VARIANCE, elementTypeInSuper)),
MemberScope.Companion.empty(elementType.getMemberScope().getContainingDeclaration()));
MemberScope.Companion.empty(elementType.getMemberScope().getOwnerDescriptor()));
data.reportError("Return type is not a subtype of overridden method. " +
"To fix it, add annotation with Kotlin signature to super method with type "