Skip to content

Wrong code generated for choice with only default case #79

@Mi-La

Description

@Mi-La
choice Test(bool selector) on selector
{
    default:
        uint32 field;
};

This generates an else block without corresponding if and the code is not compilable.

EDIT: It seems that the old C++ generator has the same bug - try in interactive editor.
EDIT2: It seems that the bug occurs only for selectros which are not possible to be used in switch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions