Skip to content

Nested with statements producing incorrect code #197

@Connicpu

Description

@Connicpu

If I try to use a with statement inside of another with statement using a value from the outer with statement, the compiler uses the inner value to retrieve the value to use as the inner value. For example,

with something!
  with .other_thing!
    \do_the_thing!

results in the following code

do
  local _with_0 = something()
  do
    local _with_1 = _with_1.other_thing()
    _with_1:do_the_thing()
  end
  return _with_0
end

I compiled this code using the latest version of the compiler through the programmatic API.

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