Skip to content

Improve error message for trailing commas in function signatures #2579

@federicobond

Description

@federicobond

Current message:

test.sol:4:31: Error: Expected type name
  function foo(uint a, uint b,) {}
                              ^

Improved message:

test.sol:4:31: Error: Unexpected trailing comma in function arguments
  function foo(uint a, uint b,) {}
                             ^

Also applies to return types:

test.sol:4:45: Error: Expected type name
  function foo(uint a, uint b) returns(uint,) {}
                                            ^

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions