-
Notifications
You must be signed in to change notification settings - Fork 245
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(go): fix generation of readonly and static properties #2133
Conversation
NOTE: It maybe worth considering refactoring this so that the static properties are wrapped in a |
60ff599
to
6d889b3
Compare
I think this is the right way to go. That would also remove the need for these checks
There isn't a lot of shared behavior between static and non-static property getters so a common ancestor wouldn't have much. Basically the only common thing it needs is the stuff declared on the This could warrant an abstract wrapper class, or maybe just another interface like
Since they would take the same constructor args maybe an abstract class is best. |
Added |
Pull request has been modified.
Pull request has been modified.
@Mergifyio update |
Command
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@Mergifyio update |
Command
|
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
@Mergifyio refresh |
Command
|
Merging (with squash)... |
Previously, we were generating setters for readonly properties, as well as including static properties as part of a class interface and implementation. This fixes the property generation to omit the setter declarations/implementations for readonly properties. It also generates static properties as the package level.
Fixes #2093
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.