1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed handling of virtual methods in boxed structs

This commit is contained in:
Brian Fiete 2020-01-15 08:34:09 -08:00
parent 7894fc73cc
commit 43d7d72f48
6 changed files with 28 additions and 26 deletions

View file

@ -4245,13 +4245,12 @@ BfAstNode* BfReducer::CreateStatement(BfAstNode* node, CreateStmtFlags createStm
// Must be an expression. Always set CreateExprFlags_NoCaseExpr, to keep ending statements in a switch case to look like case expressions
auto expr = CreateExpression(node, (CreateExprFlags)((createStmtFlags & CreateStmtFlags_To_CreateExprFlags_Mask) | CreateExprFlags_NoCaseExpr));
auto nextNode = mVisitorPos.GetNext();
if (nextNode != NULL)
if (expr != NULL)
{
FailAfter("Semicolon expected", expr);
auto nextNode = mVisitorPos.GetNext();
if (nextNode != NULL)
FailAfter("Semicolon expected", expr);
}
return expr;
}
}