Skip to content

Commit 0c352be

Browse files
committed
fix bug when merging Classifications that was clobbering IsAsync
1 parent ab1ce91 commit 0c352be

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Sema/TypeCheckEffects.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,12 @@ class Classification {
404404
}
405405

406406
void merge(Classification other) {
407+
bool oldAsync = IsAsync;
408+
407409
if (other.getResult() > getResult())
408410
*this = other;
409-
IsAsync |= other.IsAsync;
411+
412+
IsAsync = oldAsync | other.IsAsync;
410413
}
411414

412415
bool isInvalid() const { return IsInvalid; }

0 commit comments

Comments
 (0)