Skip to content

Broken inline if with define assignment #395

@kkevinm

Description

@kkevinm

I've noticed what seems to be weird behavior when using multiple inline ifs in a row to check if a define is equal to a series of values. Two examples:

!a = 1
!b = -1

if !a == 0 : !b = 0 : endif
if !a == 2 : !b = 2 : endif

print "!b"

This prints 2.

!a = 1
!b = -1

if !a == 0 : !b = 0 : endif
if !a == 1 : !b = 1 : endif
if !a == 2 : !b = 2 : endif

print "!b"

This also prints 2.

It seems like all the !b assignments are executed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions