mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Delayed function body parsing: replace two error handling code paths with asserts
This should just never happen. Swift SVN r6607
This commit is contained in:
@@ -1374,8 +1374,7 @@ bool Parser::parseDeclFuncBodyDelayed(FuncDecl *FD) {
|
||||
"function body should be delayed");
|
||||
|
||||
auto FunctionParserState = State->takeBodyState(FE);
|
||||
if (!FunctionParserState)
|
||||
return false;
|
||||
assert(FunctionParserState.get() && "should have a valid state");
|
||||
|
||||
auto BeginParserPosition = getParserPosition(FunctionParserState->BodyPos);
|
||||
auto EndLexerState = L->getStateForEndOfTokenLoc(FE->getEndLoc());
|
||||
|
||||
Reference in New Issue
Block a user