-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(java,dotnet): abstract properties have concrete implementations #1128
Conversation
The generated code for abstract properties in Java and C# included fully concrete implementations, instead of an abstract declaration. This made it possible to subclass those types without actually implementing those members, resulting in invalid code. This changes the code generation to actually emit the `abstract` keyword and not generate a full concrete implementation. Fixes #240 Fixes #1011
This is currently marked as draft because I still have to double-check whether existing test coverage is sufficient to ensure this "works as-is" or not. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Added tests (and fixed the issues they uncovered in the .NET runtime...) |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
/// </remarks> | ||
[JsiiMethod(name: "someMethod", returnsJson: "{\"type\":{\"primitive\":\"string\"}}", parametersJson: "[{\"name\":\"str\",\"type\":{\"primitive\":\"string\"}}]")] | ||
protected abstract string SomeMethod(string str); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra newline here.
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
1 similar comment
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
The generated code for abstract properties in Java and C# included fully
concrete implementations, instead of an abstract declaration. This made
it possible to subclass those types without actually implementing those
members, resulting in invalid code.
This changes the code generation to actually emit the
abstract
keywordand not generate a full concrete implementation.
Fixes #240
Fixes #1011
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.