Skip to content

Dot dot dot usage in loadstring/file #89

@coldino

Description

@coldino

I can't find in the Lua docs if this usage of ... inside loadstring or loadfile is valid or standardised, but I do see it working on LuaJit.

NeoLua Version: Latest commit (a0fdcc6)

Example to reproduce:

> data = {}
> fn = loadstring("d = ...; d.test = 1")
Error: Can not call nil value.

Expected behaviour (from LuaJit):

> data = {}
> fn = loadstring("d = ...; d.test = 1")
> fn(data)
> print(data.test)
1

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions