You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] delete statement misparsed as variable declaration with custom type "delete" #1079
When parsing a delete statement inside a function body, syn-solidity incorrectly parses it as a StmtVarDecl with a custom type named "delete" instead of recognizing it as a StmtExpr containing an ExprDelete.
Reproduction
contractExample {
Status public status;
enum Status { Pending, Active }
function resetStatus() externalreturns (Status) {
delete status;
return status;
}
}
Activity
nolanv-be commentedon Mar 5, 2026
Sadly, I don't have the time to write tests and submit a PR, but the fix is up on my fork https://github.com/nolanv-be/core/tree/fix-syn-solidity.
I also included a fix for YulPath, which was missing a deref.
felixfaisal commentedon Mar 12, 2026
Hey @nolanv-be happy to do it for you! if that's alright with you
nolanv-be commentedon Mar 14, 2026
@felixfaisal Happy to! But don't pull the latest commit on my fork because it was written by an LLM, so the quality isn't great and I don't trust the code. Here's the link to the branch before that last commit.
https://github.com/alloy-rs/core/tree/e603f535f7ba77bddce53b5bde6284d8e0386dbe