Skip to content

Commit 1401b0f

Browse files
authored
Merge pull request #69777 from slavapestov/thrown-error-position
AST: Spot fix for latent issue with thrown error in transformWithPosition()
2 parents be7198f + d3aaf66 commit 1401b0f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/AST/Type.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5045,8 +5045,7 @@ case TypeKind::Id:
50455045
// Transform the thrown error.
50465046
Type thrownError;
50475047
if (Type origThrownError = function->getThrownError()) {
5048-
thrownError = origThrownError.transformWithPosition(
5049-
TypePosition::Invariant, fn);
5048+
thrownError = origThrownError.transformWithPosition(pos, fn);
50505049
if (!thrownError)
50515050
return Type();
50525051

0 commit comments

Comments
 (0)