-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(go): nested types are not namespaced
Nested types were generated in the same package as they parent, without any namespacing additions, meaning that if two types in the same package have nested types with the same name, the generated code would be invalid. This namespaces the nested types in go by prefixing their names with their nesting type's name, using an `_` delimiter, which is the same as what is done for static methods. Also added a validation in the `jsii` compiler that prohibits that a nested type and a static method share the same PascalCase transformation, as this would result in conflicts in Go, but also in C#. Fixes #2649
- Loading branch information
1 parent
2781ff4
commit 1302e09
Showing
14 changed files
with
2,126 additions
and
1,676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
222 changes: 222 additions & 0 deletions
222
packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.