Replace function MemberScope.getContainingDeclaration() to property ownerDescriptor
This commit is contained in:
+1
-1
@@ -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")
|
||||
|
||||
+1
-1
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user