You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As type declarations are often used as part of DSLs and within accessor macros, I see no reliable way to mark them as unused assignments.
I'm not sure I get the issue you're seeing. For all I can tell, the use of type declarations in DSLs and accessor macros should be pretty much the same as with assignments. Ameba is able to handle getter foo = 1, right? Why is getter foo : Int32 problematic?
Lint/UselessAssign
rule reports local variables that are defined per assignment but never used.Type declarations also declare a variable yet do not assign to the variable. This should even more reason to report it.
For the following program, ameba should report a similar issue:
This came up in crystal-lang/crystal#14058
The text was updated successfully, but these errors were encountered: