Skip to content

Repeated field names in union are accepted #133

@jonjove

Description

@jonjove

What problem does your feature solve?

union Test switch (int v)
{
case 0:
     int x;
case 1:
     int x;
}

compiles successfully but breaks xdrc due to the repeated x. The fix for a real example that broke stellar-core can be seen in stellar/stellar-xdr#20.

What would you like to see?

This shouldn't compile.

What alternatives are there?

TODO

Metadata

Metadata

Assignees

No one assigned

    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