mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Introduce then statements
These allow multi-statement `if`/`switch` expression branches that can produce a value at the end by saying `then <expr>`. This is gated behind `-enable-experimental-feature ThenStatements` pending evolution discussion.
This commit is contained in:
@@ -246,6 +246,7 @@ void DiagnosticEmitter::emitMissingConsumeInDiscardingContext(
|
||||
case StmtKind::Return:
|
||||
case StmtKind::Yield:
|
||||
case StmtKind::Break:
|
||||
case StmtKind::Then:
|
||||
case StmtKind::Fail:
|
||||
case StmtKind::PoundAssert:
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user