feat(validation): Assignment suggestions for = operator#1049
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1049 +/- ##
==========================================
+ Coverage 95.72% 95.74% +0.01%
==========================================
Files 153 153
Lines 42883 42875 -8
==========================================
- Hits 41051 41049 -2
+ Misses 1832 1826 -6 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
How did these tests change? Nothing in the commit affects codegen/debugging
There was a problem hiding this comment.
Adding a type-hint onto the condition of control statements does because we then enter the cast_if_needed here afaik
There was a problem hiding this comment.
My guess is because the condition expressions now receive a type-hint, we hit the cast_if_needed call in generate_expression were previously we returned the value as-is
There was a problem hiding this comment.
Just to add some additional context, this issue will go away once we implement #1041
This PR adds a validation to identify binary expressions using the
=operator with no effects. For example the following statementfoo = bar;does nothing and the user probably meant to use a:=here, i.e.foo := bar;.Resolves #939