Skip to content

Commit 040f44d

Browse files
authored
Merge pull request #5658 from DougGregor/clear-stmt-type-vars
[Type checker] Recurse into statements when cleaning type variables.
2 parents c5f3079 + 45db3e3 commit 040f44d

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

lib/Sema/TypeCheckConstraints.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,12 +1301,6 @@ void CleanupIllFormedExpressionRAII::doIt(Expr *expr, ASTContext &Context) {
13011301
}
13021302
return true;
13031303
}
1304-
1305-
// Don't walk into statements. This handles the BraceStmt in
1306-
// non-single-expr closures, so we don't walk into their body.
1307-
std::pair<bool, Stmt *> walkToStmtPre(Stmt *S) override {
1308-
return { false, S };
1309-
}
13101304
};
13111305

13121306
if (expr)

validation-test/compiler_crashers/28413-swift-typebase-getcanonicaltype.swift renamed to validation-test/compiler_crashers_fixed/28413-swift-typebase-getcanonicaltype.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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 -parse
8+
// RUN: not %target-swift-frontend %s -parse
99
t c
1010
let : {{
1111
return $0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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
guard{{return $0
1010
== Int
1111
p

0 commit comments

Comments
 (0)