Skip to content

Compile error: transformer.lua:23: table index is nil #428

Description

@linkpy
variable = \function

Generates the error :

test.moon       Compile error: ...l/share/lua/5.1/moonscript/transform/transformer.lua:23: table index is nil
stack traceback:
        ...l/share/lua/5.1/moonscript/transform/transformer.lua:23: in function <...l/share/lua/5.1/moonscript/transform/transformer.lua:19>
        (tail call): ?
        /usr/local/share/lua/5.1/moonscript/compile.lua:476: in function 'value'
        ...usr/local/share/lua/5.1/moonscript/compile/value.lua:120: in function 'fn'
        /usr/local/share/lua/5.1/moonscript/compile.lua:491: in function 'value'
        ...local/share/lua/5.1/moonscript/compile/statement.lua:96: in function <...local/share/lua/5.1/moonscript/compile/statement.lua:91>
        ...local/share/lua/5.1/moonscript/compile/statement.lua:100: in function 'fn'
        /usr/local/share/lua/5.1/moonscript/compile.lua:530: in function 'stm'
        /usr/local/share/lua/5.1/moonscript/compile.lua:564: in function 'stms'
        ...local/share/lua/5.1/moonscript/compile/statement.lua:235: in function 'fn'
        /usr/local/share/lua/5.1/moonscript/compile.lua:530: in function 'stm'
        /usr/local/share/lua/5.1/moonscript/compile.lua:564: in function </usr/local/share/lua/5.1/moonscript/compile.lua:555>
        (tail call): ?
        /usr/local/share/lua/5.1/moonscript/compile.lua:530: in function 'stm'
        /usr/local/share/lua/5.1/moonscript/compile.lua:564: in function </usr/local/share/lua/5.1/moonscript/compile.lua:555>
        (tail call): ?
        (tail call): ?
  1. I know that in that case the code is invalid, but i found that issue with valid code (within a with block).
  2. Even if the code is erronous, an error like that shouldn't be generated (since it's an internal error).
  3. moonc -T test.moon and moonc -b test.moon generates the same error without displaying more information.

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