Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when parsing expression initializing an array of anonymous functions #136

Closed
Xenomega opened this issue Jan 15, 2019 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@Xenomega
Copy link
Member

The following contract will cause slither to error:

contract C {
    function f() view public {
        function() external [] memory x;
        x = new function() external [](5);
    }
}

Error:

ERROR:ExpressionParsing:Incorrect type array {'attributes': {'constant': False, 'payable': False, 'stateMutability': 'nonpayable', 'type': 'function () external', 'visibility': 'external'}, 'children': [{'attributes': {'parameters': [None]}, 'children': [], 'id': 10, 'name': 'ParameterList', 'src': '112:2:0'}, {'attributes': {'parameters': [None]}, 'children': [], 'id': 11, 'name': 'ParameterList', 'src': '124:0:0'}], 'id': 12, 'name': 'FunctionTypeName', 'src': '104:21:0'}
@montyly montyly added the bug Something isn't working label Jan 17, 2019
@montyly
Copy link
Member

montyly commented Jan 18, 2019

Fixed in dev

@montyly montyly closed this as completed Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants