Skip to content

Commit f207ca1

Browse files
committed
[AST] SE-0347: Don't check default expression status in type request
Information about whether or not default expression is type-checked is not going to be available for deserialized declaration and it's not necessary for type requests anyway. Resolves: rdar://95990526
1 parent 9a38146 commit f207ca1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/AST/TypeCheckRequests.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,10 +1214,7 @@ Optional<Type> DefaultArgumentTypeRequest::getCachedResult() const {
12141214
if (!defaultInfo)
12151215
return None;
12161216

1217-
if (!defaultInfo->InitContextAndIsTypeChecked.getInt())
1218-
return None;
1219-
1220-
return defaultInfo->ExprType;
1217+
return defaultInfo->ExprType ? defaultInfo->ExprType : Optional<Type>();
12211218
}
12221219

12231220
void DefaultArgumentTypeRequest::cacheResult(Type type) const {

0 commit comments

Comments
 (0)