Skip to content

Does not handle "repeat until" correctly #16

Description

@bluelightzero

Simplest example:

local local_i = 0
repeat
    local local_a = local_i + 1
    local_i = local_i + 1
    print ("local_i = "..local_i)
until local_a >= 10

Outputs: (whitespace for readability)

local a = 0
repeat
    local b = a + 1
    a = a + 1
    print ("local_i = "..a)
until local_a >= 10 --local not updated!

It can be worked around by creating a local variable outside the loop, but this should not be needed:

local local_i = 0
local local_a = 0
repeat
    local_a = local_i + 1
    local_i = local_i + 1
    print ("local_i = "..local_i)
until local_a >= 10

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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