-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Diagnostics] Introduce extraneous call fix #27976
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
Conversation
One of the last steps on the way to remove |
@swift-ci please smoke test |
// Let's make this fix as high impact so if there is a function or member | ||
// overload with e.g. argument-to-parameter type mismatches it would take | ||
// a higher priority. | ||
return recordFix(fix, /*impact=*/10) ? SolutionKind::Error |
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.
Do you think we're developing the need for more a principled priority mechanism among fixes?
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 think that's something we need to think about for the long term, but logic involved there would be even more complicated than CSRanking, so I'm postponing that as much as possible. So far "weight" such as what impact
really is seems to be doing the job well enough.
// Let's make this fix as high impact so if there is a function or member | ||
// overload with e.g. argument-to-parameter type mismatches it would take | ||
// a higher priority. | ||
return recordFix(fix, /*impact=*/10) ? SolutionKind::Error |
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.
This isn't specific to this change or something that needs to be addressed now, but what do you think about making impact
a method on ConstraintFix
that subclasses could override as needed? I think it would make it easier to determine the relative importance of fixes by just scanning the CSFix
header.
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.
Oops, didn't see @hborla's comment before posting
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 was thinking about doing that as well, but some far most of the impact changes where contextual in nature. Although maybe that's a nice long-hanging fruit to tackle for clarity...
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.
My hope is once we finish porting majority of diagnostics we would become more clear whether we can stick to weight or need something more comprehensive than that...
Detect and diagnose attempts to call variables and/or properties which don't have a function type, so can't really support invocation.
cf194e1
to
1315207
Compare
@swift-ci please smoke test |
@swift-ci please smoke test Linux platform |
Please test with following PR: @swift-ci please smoke test Linux platform |
@swift-ci please test Linux platform |
Detect and diagnose attempts to call variables and/or properties
which don't have a function type, so can't really support
invocation.