1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

IsTypeReference arg fix

This commit is contained in:
Brian Fiete 2022-03-17 07:34:42 -07:00
parent 78c0462d87
commit eefe25ef18

View file

@ -1723,7 +1723,7 @@ BfExpression* BfReducer::CreateExpression(BfAstNode* node, CreateExprFlags creat
int endNodeIdx = -1;
if ((IsTypeReference(exprLeft, BfToken_LBracket, -1, &endNodeIdx, NULL)))
{
if (IsTypeReference(exprLeft, BfToken_LBrace, NULL, NULL))
if (IsTypeReference(exprLeft, BfToken_LBrace, -1, NULL, NULL))
{
BfSizedArrayCreateExpression* arrayCreateExpr = mAlloc->Alloc<BfSizedArrayCreateExpression>();
auto typeRef = CreateTypeRef(exprLeft);
@ -1752,7 +1752,7 @@ BfExpression* BfReducer::CreateExpression(BfAstNode* node, CreateExprFlags creat
}
}
}
else if (IsTypeReference(exprLeft, BfToken_LParen, NULL, NULL))
else if (IsTypeReference(exprLeft, BfToken_LParen, -1, NULL, NULL))
{
if (auto tokenNode = BfNodeDynCast<BfTokenNode>(mVisitorPos.Get(endNodeIdx - 1)))
{