Skip to content

Commit 26bab61

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 (cherry picked from commit f207ca1)
1 parent 28245ef commit 26bab61

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
@@ -1230,10 +1230,7 @@ Optional<Type> DefaultArgumentTypeRequest::getCachedResult() const {
12301230
if (!defaultInfo)
12311231
return None;
12321232

1233-
if (!defaultInfo->InitContextAndIsTypeChecked.getInt())
1234-
return None;
1235-
1236-
return defaultInfo->ExprType;
1233+
return defaultInfo->ExprType ? defaultInfo->ExprType : Optional<Type>();
12371234
}
12381235

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

0 commit comments

Comments
 (0)