mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Sema] Recontextualize BreakStmt + ContinueStmt in lazy vars
I don't think this currently matters, but ensure we re-contextualize BreakStmts and ContinueStmts in RecontextualizeClosures since these statements store DeclContexts.
This commit is contained in:
@@ -1613,6 +1613,7 @@ public:
|
||||
}
|
||||
|
||||
DeclContext *getDeclContext() const { return DC; }
|
||||
void setDeclContext(DeclContext *newDC) { DC = newDC; }
|
||||
|
||||
static bool classof(const Stmt *S) {
|
||||
return S->getKind() == StmtKind::Break;
|
||||
@@ -1648,6 +1649,7 @@ public:
|
||||
}
|
||||
|
||||
DeclContext *getDeclContext() const { return DC; }
|
||||
void setDeclContext(DeclContext *newDC) { DC = newDC; }
|
||||
|
||||
static bool classof(const Stmt *S) {
|
||||
return S->getKind() == StmtKind::Continue;
|
||||
|
||||
Reference in New Issue
Block a user