Skip to content

Parameter names can duplicate seq/instance names #923

Closed
@Mingun

Description

@Mingun

Right now any parameter of a type are transformed to a field in the generated type like a regular seq/instance attribute in all targets and, consequently, shares the same namespace. However, the compiler doesn't check that parameter names are not the same as seq/instance attributes:

meta:
  id: parameters_bug
params:
  - id: param
    type: bool
seq:
  - id: param
    size: 1
# instances:
#   param:
#     value: param

Because there is no dedicated syntax in the expression language to distinguish between parameter names and other attributes, it seems that such ability most likely a bug not a feature, and should be prohibited.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions