[NI] Complete calls during one inference session only once
The problem is that delegated properties resolve two calls together: `getValue`/`setValue` with a common receiver, which can contain callable references. For each completion new anonymous descriptor was created and caused "rewrite at slice" exceptions later. Now there is a little hack to check that during one inference session we don't complete one call more than one time. More correct fix would be to explicitly specify common receiver for inference session but it requires quite big refactoring, which will be done later with a whole refactoring of the common solver #KT-30250 Fixed
This commit is contained in:
+2
@@ -25,6 +25,7 @@ interface InferenceSession {
|
||||
): Map<TypeConstructor, UnwrappedType> = emptyMap()
|
||||
|
||||
override fun writeOnlyStubs(): Boolean = false
|
||||
override fun callCompleted(resolvedAtom: ResolvedAtom): Boolean = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +36,7 @@ interface InferenceSession {
|
||||
fun currentConstraintSystem(): ConstraintStorage
|
||||
fun inferPostponedVariables(lambda: ResolvedLambdaAtom, initialStorage: ConstraintStorage): Map<TypeConstructor, UnwrappedType>
|
||||
fun writeOnlyStubs(): Boolean
|
||||
fun callCompleted(resolvedAtom: ResolvedAtom): Boolean
|
||||
}
|
||||
|
||||
interface PartialCallInfo {
|
||||
|
||||
Reference in New Issue
Block a user