Implement top-down completion for nested builder inference calls
^KT-42742 Fixed
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ public class ReceiverParameterDescriptorImpl extends AbstractReceiverParameterDe
|
||||
}
|
||||
|
||||
public void setOutType(@NotNull KotlinType outType) {
|
||||
assert TypeUtilsKt.shouldBeSubstituted(this.value.getType());
|
||||
assert TypeUtilsKt.shouldBeUpdated(this.value.getType());
|
||||
this.value = value.replaceType(outType);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ public abstract class VariableDescriptorImpl extends DeclarationDescriptorNonRoo
|
||||
}
|
||||
|
||||
public void setOutType(KotlinType outType) {
|
||||
assert this.outType == null || TypeUtilsKt.shouldBeSubstituted(this.outType);
|
||||
assert this.outType == null || TypeUtilsKt.shouldBeUpdated(this.outType);
|
||||
this.outType = outType;
|
||||
}
|
||||
|
||||
|
||||
@@ -308,4 +308,4 @@ private fun NewCapturedType.unCaptureTopLevelType(): UnwrappedType {
|
||||
return constructor.projection.type.unwrap()
|
||||
}
|
||||
|
||||
fun KotlinType.shouldBeSubstituted() = contains { it is StubType || it.constructor is TypeVariableTypeConstructorMarker }
|
||||
fun KotlinType.shouldBeUpdated() = contains { it is StubType || it.constructor is TypeVariableTypeConstructorMarker || it.isError }
|
||||
|
||||
Reference in New Issue
Block a user