Bug: incorrect AST produced for nested namespaces #4966
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
AST
PRs and Issues about the AST structure
breaking change
This change will require a new major version to be released
bug
Something isn't working
Milestone
This was forgotten when we worked around #2573
For
namespace foo { namespace bar {} }
we produce the following AST:TSModuleDeclaration[id = foo] > TSModuleBlock > TSModuleDeclaration[id = bar] > TSModuleBlock
For
namespace foo.bar {}
produces the following AST:TSModuleDeclaration[id = foo] > TSModuleDeclaration[id = bar] > TSModuleBlock
The AST we produce is driven by the AST TS produces - they emit the nested module declaration, so our code does as well.
Ultimately however is pretty incorrect and does not correctly represent the code as written.
Instead we should emit an
EntityName
, thus allowingTSQualifiedName
in the.id
:TSModuleDeclaration[id = foo.bar] > TSModuleBlock
The text was updated successfully, but these errors were encountered: