[NI] Support calling abstract class constructor in delegating call
This commit is contained in:
committed by
Stanislav Erokhin
parent
549e8ba668
commit
4448637727
+1
-1
@@ -36,7 +36,7 @@ import org.jetbrains.kotlin.types.typeUtil.asTypeProjection
|
||||
|
||||
internal object CheckInstantiationOfAbstractClass : ResolutionPart {
|
||||
override fun SimpleKotlinResolutionCandidate.process(): List<KotlinCallDiagnostic> {
|
||||
if (candidateDescriptor is ConstructorDescriptor && !kotlinCall.isSupertypeConstructorCall) {
|
||||
if (candidateDescriptor is ConstructorDescriptor && !kotlinCall.isSuperOrDelegatingConstructorCall) {
|
||||
if (candidateDescriptor.constructedClass.modality == Modality.ABSTRACT) {
|
||||
return listOf(InstantiationOfAbstractClass)
|
||||
}
|
||||
|
||||
+1
-1
@@ -67,6 +67,6 @@ class SimpleConstraintSystemImpl(constraintInjector: ConstraintInjector, resultT
|
||||
override val externalArgument: KotlinCallArgument? get() = throw UnsupportedOperationException()
|
||||
override val isInfixCall: Boolean get() = throw UnsupportedOperationException()
|
||||
override val isOperatorCall: Boolean get() = throw UnsupportedOperationException()
|
||||
override val isSupertypeConstructorCall: Boolean get() = throw UnsupportedOperationException()
|
||||
override val isSuperOrDelegatingConstructorCall: Boolean get() = throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ interface KotlinCall {
|
||||
|
||||
val isInfixCall: Boolean
|
||||
val isOperatorCall: Boolean
|
||||
val isSupertypeConstructorCall: Boolean
|
||||
val isSuperOrDelegatingConstructorCall: Boolean
|
||||
}
|
||||
|
||||
private fun SimpleKotlinCallArgument.checkReceiverInvariants() {
|
||||
|
||||
Reference in New Issue
Block a user