mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed valueless alias, warn on unused attribute
This commit is contained in:
parent
83ed41e81a
commit
5a3701fa90
4 changed files with 17 additions and 13 deletions
|
@ -3760,7 +3760,7 @@ void BfModule::Visit(BfLocalMethodDeclaration* methodDecl)
|
|||
void BfModule::Visit(BfAttributedStatement* attribStmt)
|
||||
{
|
||||
BfAttributeState attributeState;
|
||||
|
||||
attributeState.mSrc = attribStmt->mAttributes;
|
||||
attributeState.mTarget = (BfAttributeTargets)(BfAttributeTargets_Invocation | BfAttributeTargets_MemberAccess);
|
||||
if (auto block = BfNodeDynCast<BfBlock>(attribStmt->mStatement))
|
||||
attributeState.mTarget = BfAttributeTargets_Block;
|
||||
|
@ -3786,10 +3786,7 @@ void BfModule::Visit(BfAttributedStatement* attribStmt)
|
|||
VisitChild(attribStmt->mStatement);
|
||||
}
|
||||
|
||||
if (!attributeState.mUsed)
|
||||
{
|
||||
Fail("Unused attributes", attribStmt->mAttributes);
|
||||
}
|
||||
FinishAttributeState(&attributeState);
|
||||
}
|
||||
|
||||
void BfModule::Visit(BfExpression* expression)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue