Skip to content

AddressType wrongly accepts just payable state mutability as the whole type #654

@Xanewok

Description

@Xanewok

YAML spec

- name: "AddressType"
  kind: "Parser"
  unversioned:
    choice:
      - sequence:
          - reference: "AddressKeyword"
          - optional:
              reference: "PayableKeyword"
      - reference: "PayableKeyword"

DSL v1

parser AddressType = ((AddressKeyword (PayableKeyword ?)) | PayableKeyword) ;

DSL v2

Struct(
    name = AddressType,
    fields = (
        address_keyword = Required(Terminal([AddressKeyword])),
        payable_keyword = Optional(kind = Terminal([PayableKeyword]))
    )
)

but ElementaryType accepts PayableKeyword alongside AddressType.

The address type should be address (payable). There is also payable(<address>) conversion expression but that should be handled separately, as payable on its own is not an elementary type.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions