-
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(jsii): class members named after the class result in illegal C# (#…
…1903) It is illegal in C# to name a class' member (method, property) with the same name as the class itself (even if the member is static). Since both class and member names are pascal-cased in C#, this means a class' members cannot share the same PascalCased representation. This adds a compile-time validation for this condition, effectively calling out member names to have the same PascalCased representation as their declaring class' name. This is currently only a warning, as this is "made to work" by altering the type name by appending `_` at the end of it, which is ugly and dangerous but works, and is currently done in several places). As all warnings, this turns into an error when operating under `--strict`, and future work (i.e: #1931) will allow more granular configuration of these errors, so we can hopefully opt all new codebases into the strict behavior and eventually drop the slugification. Fixes #1880
- Loading branch information
1 parent
ffc6b7d
commit bc71154
Showing
29 changed files
with
2,476 additions
and
2,279 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
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
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.