Skip to content

Function treated as state variable #114

@0x19

Description

@0x19

Old versions of solidity contracts use for fallback and receive (sometimes even having revert) following function syntax

function () payable { ... }

Current AST parsing will fail if function like above is reached. It will fail under state variable discovery (which is weird).

So far, only investigating potential solutions. Most likely this will be related to grammar file not supporting functions like that. If that's the case, we'll branch off grammar from solidity externals and start maintaining our own (or just apply patches once we sync external repo).

If it's grammar issue, it's in fact, not issue but no longer supported functionality and therefore we cannot file any bugs.
If it's due to antlr-go, then we need to file bug to antlr or fork it off.

It happens very rarely, only with old contracts.

Metadata

Metadata

Assignees

Labels

astAbstract Syntax TreebugSomething isn't workingfuture workSomething we should do in the futurehigh priorityHigh Priority Tasks

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions