-
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(diff): check base types #1354
Conversation
Check that an updated type still extends all of its previous base types, so that objects of the updated type can still be assigned to variables or passed into parameters of the declared supertype. This check would have prevented a deployment failure during a big refactoring of the CDK.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
* still a supertype of T'. | ||
*/ | ||
function assignableToAllBaseTypes(original: reflect.ReferenceType, updated: reflect.ReferenceType): Analysis { | ||
for (const B of baseTypes(original)) { |
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.
for (const B of baseTypes(original)) { | |
for (const base of baseTypes(original)) { |
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.
Yeah. Well it was B
on purpose to match the docstring just above it.
But sure.
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.
I agree w/ @eladb; other than that, LGTM :)
Cool. Now we just have to wait for @MrArnoldPalmer |
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
Merging (with squash)... |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Merging (with squash)... |
Check that an updated type still extends all of its previous base types,
so that objects of the updated type can still be assigned to variables
or passed into parameters of the declared supertype.
This check would have prevented a deployment failure during a big
refactoring of the CDK.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.