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:
Dmitri Hrybenko
2013-07-25 20:03:55 +00:00
parent 258d4fd3c2
commit 56998205d6
2 changed files with 6 additions and 8 deletions

View File

@@ -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());