Code generation for alt (if,else-if,else) broken

Issue #255 resolved
Matthias Schoettle created an issue

Given a combined fragment with operator kind alt, the generated code might be broken if the second constraint is left empty.

The actual result is that else if () is generated instead of an else.

The reason seems to be that always an OpaqueExpression is created, which by default has no body. The current check in the code generator only checks for an unset constraint itself.

Comments (1)

  1. Matthias Schoettle reporter

    Resolves #255: Adds an additional check for "else if" to make sure that the body of the OpaqueExpression is undefined or empty.

    This assumes that the constraint is an OpaqueExpression, which is the case right now.

    → <<cset 83170f813307>>

  2. Log in to comment