// (This is reproducible without the shorthand syntax.)
namespace Foo.Bar {}
namespace Foo.Bar {
export const baz = 32;
}
export { Foo }
local ____exports = {}
local Foo = {}
do
Foo.Bar = {}
end
do
do
Bar.baz = 32 -- `Bar` is not valid in this scope!
end
end
____exports.Foo = Foo
return ____exports
I patched this this myself by changing transformation/visitors/namespace.ts's line 94 to remove (isNonModuleMergeable || isFirstDeclaration) from the condition, but I would presume the conditional was there in the first place to prevent some issue. I'm unfortunately currently unable to run the tests to confirm this, but so far my project seems okay. If that doesn't resolve it, hopefully it at least provides some sort of clue. :)
I patched this this myself by changing
transformation/visitors/namespace.ts's line94to remove(isNonModuleMergeable || isFirstDeclaration)from the condition, but I would presume the conditional was there in the first place to prevent some issue. I'm unfortunately currently unable to run the tests to confirm this, but so far my project seems okay. If that doesn't resolve it, hopefully it at least provides some sort of clue. :)