-
Notifications
You must be signed in to change notification settings - Fork 55
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: false-positive downcast warnings #1114
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1114 +/- ##
==========================================
+ Coverage 95.59% 95.63% +0.04%
==========================================
Files 148 148
Lines 43500 43585 +85
==========================================
+ Hits 41583 41684 +101
+ Misses 1917 1901 -16 ☔ View full report in Codecov by Sentry. |
Fixes false-positive downcast warnings on integrally promoted expressions. This is achieved by checking each element's type in the expression individually and comparing it to the resulting type rather than checking the expression's type as a whole.
these tests try to trick the validator to believe that a DINT updscale is happening.
@riederm when you get the chance, could you please take a look at the changes I've made since your last review? |
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 I need some clarification with the is_builtin_call flag in the context, rest of PR is good.
Fixes false-positive downcast warnings on integrally promoted expressions. This is achieved by checking each element's type in the expression individually and comparing it to the resulting type rather than checking the expression's type as a whole and mirrors the behaviour of CodeSys.
resolves #828