-
Notifications
You must be signed in to change notification settings - Fork 245
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 (#2650)
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 --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
- Loading branch information
1 parent
7006e11
commit 45b527c
Showing
16 changed files
with
3,164 additions
and
1,680 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
--- | ||
extends: ../../eslint-config.yaml | ||
|
||
ignorePatterns: | ||
- test/generated-code/examples/** |
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
Oops, something went wrong.