mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-18 08:06:04 +02:00
Fixed method param attribute parsing with no type specified
This commit is contained in:
parent
244407c7fe
commit
1b26619087
2 changed files with 12 additions and 1 deletions
|
@ -9103,6 +9103,16 @@ BfTokenNode* BfReducer::ParseMethodParams(BfAstNode* node, SizedArrayImpl<BfPara
|
|||
{
|
||||
if ((token != BfToken_In) && (token != BfToken_Out) && (token != BfToken_Ref) && (token != BfToken_Mut) && (token != BfToken_Params) && (token != BfToken_ReadOnly))
|
||||
{
|
||||
if (attributes != NULL)
|
||||
{
|
||||
auto paramDecl = mAlloc->Alloc<BfParameterDeclaration>();
|
||||
ReplaceNode(attributes, paramDecl);
|
||||
MoveNode(paramDecl, node);
|
||||
params->push_back(paramDecl);
|
||||
MEMBER_SET(paramDecl, mAttributes, attributes);
|
||||
attributes = NULL;
|
||||
}
|
||||
|
||||
Fail("Invalid token", tokenNode);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -3474,6 +3474,7 @@ int BfResolvedTypeSet::DoHash(BfTypeReference* typeRef, LookupContext* ctx, BfHa
|
|||
}
|
||||
}
|
||||
|
||||
if (fieldType != NULL)
|
||||
hashVal = ((hashVal ^ (Hash(fieldType, ctx, (BfHashFlags)(BfHashFlag_AllowRef), hashSeed))) << 5) - hashVal;
|
||||
hashVal = ((hashVal ^ (HashNode(param->mNameNode))) << 5) - hashVal;
|
||||
isFirstParam = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue