-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Labels
bugscope: transpileAny transpilation not directly related to code transformsAny transpilation not directly related to code transforms
Description
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:
["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_CONSTANTInstead 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_CONSTANTThis is a very nasty bug!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugscope: transpileAny transpilation not directly related to code transformsAny transpilation not directly related to code transforms