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

Fixed erroneous return type limitations for operators

This commit is contained in:
Brian Fiete 2021-12-17 08:30:15 -05:00
parent 5cc6f13af4
commit ecdc22920a
3 changed files with 4 additions and 7 deletions

View file

@ -5912,12 +5912,9 @@ BfAstNode* BfReducer::ReadTypeMember(BfTokenNode* tokenNode, bool declStarted, i
ReplaceNode(tokenNode, operatorDecl);
operatorDecl->mOperatorToken = tokenNode;
auto nextIdentifier = ExpectIdentifierAfter(operatorDecl, "type");
if (nextIdentifier == NULL)
return operatorDecl;
mVisitorPos.mReadPos--; // Backtrack, that's part of our type
auto typeRef = CreateTypeRefAfter(operatorDecl);
if (typeRef == NULL)
return operatorDecl;
MEMBER_SET_CHECKED(operatorDecl, mReturnType, typeRef);
operatorDecl->mIsConvOperator = true;