Skip to content

Commit a22247b

Browse files
committed
[TypeJoin] Return Unimplemented (aka Type()) for things we cannot yet compute.
It's important not to return `Any` for joins that we cannot compute to distinguish them from ones that we currently can compute but result in `Any`. I don't have a test case for this that is independent of other changes that I have that are not yet ready to merge. With the testing infrastructure we have for join we don't currently have a way to test out cases that fail in this fashion.
1 parent dfb01b6 commit a22247b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/TypeJoinMeet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ CanType TypeJoin::visitProtocolCompositionType(CanType second) {
397397

398398
// FIXME: Handle other types here.
399399
if (!First->isExistentialType())
400-
return TheAnyType;
400+
return Unimplemented;
401401

402402
SmallVector<Type, 1> protocolType;
403403
ArrayRef<Type> firstMembers;

0 commit comments

Comments
 (0)