Skip to content

Commit 6411063

Browse files
committed
Rework effects checking to maintain thrown type information.
While here, eliminate some redundancy in the implementation of effects checking be consolidating the logic for computing a `Classification` from a particular expression or other entity.
1 parent e51faf2 commit 6411063

File tree

3 files changed

+451
-249
lines changed

3 files changed

+451
-249
lines changed

lib/Sema/CSApply.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8892,7 +8892,7 @@ static Expr *wrapAsyncLetInitializer(
88928892
ConstraintSystem &cs, Expr *initializer, DeclContext *dc) {
88938893
// Form the autoclosure type. It is always 'async', and will be 'throws'.
88948894
Type initializerType = initializer->getType();
8895-
bool throws = TypeChecker::canThrow(initializer);
8895+
bool throws = TypeChecker::canThrow(cs.getASTContext(), initializer);
88968896
auto extInfo = ASTExtInfoBuilder()
88978897
.withAsync()
88988898
.withConcurrent()

0 commit comments

Comments
 (0)