Invalid warning from compiler with smart casting #19539
Labels
Bug
This tag is applied to issues which reports bugs.
Unit: Checker
Bugs/feature requests, that are related to the type checker.
Describe the bug
Using a variable for
if mut var is Type { ... }
produces the unused variable V warning even though it is being used.if var is Type { ... }
does not have the same warning. Ideally it should instead let me know to use the if statement without themut
in it.Reproduction Steps
Expected Behavior
output:
Current Behavior
output:
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.2 37e5616
Environment details (OS name and version, etc.)
Note
You can vote for this issue using the 👍 reaction. More votes increase the issue's priority for developers.
Take into account that only the 👍 reaction counts as a vote.
Only reactions to the issue itself will be counted as votes, not comments.
The text was updated successfully, but these errors were encountered: