K2: implement BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTION
#KT-59390 Fixed
This commit is contained in:
committed by
Space Team
parent
299d279915
commit
526bc1744a
+6
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.resolve.calls.tower.CandidateApplicability
|
||||
import org.jetbrains.kotlin.resolve.calls.tower.CandidateApplicability.*
|
||||
import org.jetbrains.kotlin.types.EmptyIntersectionTypeKind
|
||||
import org.jetbrains.kotlin.types.model.KotlinTypeMarker
|
||||
import org.jetbrains.kotlin.types.model.TypeParameterMarker
|
||||
import org.jetbrains.kotlin.types.model.TypeVariableMarker
|
||||
|
||||
interface OnlyInputTypeConstraintPosition
|
||||
@@ -173,6 +174,11 @@ class OnlyInputTypesDiagnostic(val typeVariable: TypeVariableMarker) : Constrain
|
||||
class LowerPriorityToPreserveCompatibility(val needToReportWarning: Boolean) :
|
||||
ConstraintSystemError(RESOLVED_NEED_PRESERVE_COMPATIBILITY)
|
||||
|
||||
open class MultiLambdaBuilderInferenceRestriction<T>(
|
||||
val anonymous: T,
|
||||
val typeParameter: TypeParameterMarker
|
||||
) : ConstraintSystemError(RESOLVED_WITH_ERROR)
|
||||
|
||||
fun Constraint.isExpectedTypePosition() =
|
||||
position.from is ExpectedTypeConstraintPosition<*> || position.from is DelegatedPropertyConstraintPosition<*>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user