Steps to reproduce:
git clone git@github.com:Zamiell/tstl-bug.git
cd tstl-bug
npm ci
npx tstl
vim dist/main.lua
For reference, you can look at the minimal TSTL module here: https://github.com/Zamiell/tstl-module
The bugged code is here:
["lua_modules.@zamiell.tstl-module.dist.feature.feature"] = function(...)
local ____exports = {}
local ____constants = require("lua_modules.@zamiell.tstl-module.dist.feature.constants") -- BUG HERE
local BASE_CONSTANT = ____constants.BASE_CONSTANT
local ____constants = require("lua_modules.@zamiell.tstl-module.dist.feature.constants")
local FEATURE_CONSTANT = ____constants.FEATURE_CONSTANT
Instead of this, TSTL should be outputting this:
["lua_modules.@zamiell.tstl-module.dist.feature.feature"] = function(...)
local ____exports = {}
local ____constants = require("lua_modules.@zamiell.tstl-module.dist.constants") -- FIX HERE
local BASE_CONSTANT = ____constants.BASE_CONSTANT
local ____constants = require("lua_modules.@zamiell.tstl-module.dist.feature.constants")
local FEATURE_CONSTANT = ____constants.FEATURE_CONSTANT
This is a very nasty bug!
Steps to reproduce:
git clone git@github.com:Zamiell/tstl-bug.git cd tstl-bug npm ci npx tstl vim dist/main.luaFor reference, you can look at the minimal TSTL module here: https://github.com/Zamiell/tstl-module
The bugged code is here:
Instead of this, TSTL should be outputting this:
This is a very nasty bug!