Skip to content

With with with inside with is broken. #187

@ghost

Description

Apologies in advance for the amazingly clever title.

Encountered this issue when working with love configs. This snippet:

with t
  with .window
    .width = 1920
    .height = 1080
    .fullscreen = true
    .fullscreentype = 'desktop'

Compiles to:

do
  local _with_0 = t
  do
    local _with_1 = _with_1.window -- whoops! this should be _with_0.window
    _with_1.width = 1920
    _with_1.height = 1080
    _with_1.fullscreen = true
    _with_1.fullscreentype = 'desktop'
  end
  return _with_0
end

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