Set member scope for builder inference stub types equivalent to Any

This commit is contained in:
Victor Petukhov
2021-05-11 17:17:19 +03:00
parent 6356b9d501
commit afbda75581
2 changed files with 3 additions and 1 deletions
@@ -92,7 +92,7 @@ internal class MemberScopeTowerLevel(
): Collection<CandidateWithBoundDispatchReceiver> {
val receiverValue = dispatchReceiver.receiverValue
if (receiverValue.type is StubType) {
if (receiverValue.type is AbstractStubType && receiverValue.type.memberScope is ErrorUtils.ErrorScope) {
return arrayListOf()
}
@@ -17,6 +17,8 @@ class StubTypeForBuilderInference(
override fun materialize(newNullability: Boolean): AbstractStubType =
StubTypeForBuilderInference(originalTypeVariable, newNullability)
override val memberScope = originalTypeVariable.builtIns.anyType.memberScope
override fun toString(): String {
// BI means builder inference
return "Stub (BI): $originalTypeVariable${if (isMarkedNullable) "?" else ""}"