Skip to content

Commit 6ab5a2f

Browse files
authored
Merge pull request #5659 from DougGregor/clear-stmt-type-vars-harder
[Type checker] Recurse into statements when cleaning type variables, …
2 parents 040f44d + 01913be commit 6ab5a2f

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

lib/Sema/ConstraintSystem.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2411,12 +2411,6 @@ class ExprCleaner {
24112411
TS->Patterns.insert({ P, P->getType() });
24122412
return { true, P };
24132413
}
2414-
2415-
// Don't walk into statements. This handles the BraceStmt in
2416-
// non-single-expr closures, so we don't walk into their body.
2417-
std::pair<bool, Stmt *> walkToStmtPre(Stmt *S) override {
2418-
return { false, S };
2419-
}
24202414
};
24212415

24222416
E->walk(ExprCleanserImpl(this));

validation-test/compiler_crashers/28474-unreachable-executed-at-swift-lib-ast-type-cpp-1325.swift renamed to validation-test/compiler_crashers_fixed/28474-unreachable-executed-at-swift-lib-ast-type-cpp-1325.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
// See http://swift.org/LICENSE.txt for license information
66
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
77

8-
// RUN: not --crash %target-swift-frontend %s -emit-ir
8+
// RUN: not %target-swift-frontend %s -emit-ir
99
b<n([print{$0

0 commit comments

Comments
 (0)