-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
'val' should not be legal in basic for loops. #419
Comments
👤 reinierz 🕗 Feb 14, 2012 at 01:37 UTC This actually works and is really cool: for (val x = 5, y = ""; ; ) { Unfortunately, while it's cool that that works, we CANNOT delombok it. Practically speaking having final variables declared inside a basic for loop's line has no real use cases, either. The easiest solution is to just disallow use of 'val' here. We won't, of course, mess with using 'val' in foreach loops! NB: We should also test how delombok treats: val x = 5, y = ""; as a variable declaration. Correct treatment is allowing it and splitting it into two var decls which I'm fairly sure will happen, but, we should add a test. |
👤 reinierz 🕗 Feb 14, 2012 at 01:37 UTC NB: Someone sent me a message about this (twitter, google+, google groups? I can't remember). Anyway, all credit to him for figuring this one out :) |
👤 reinierz 🕗 Feb 15, 2012 at 03:36 UTC Fixed; will be in whatever's after 0.10.8. |
👤 askoning 🕗 Mar 02, 2012 at 19:37 UTC |
👤 enrique.dacostacambio 🕗 Mar 17, 2015 at 06:55 UTC Would it make sense to enforce that all variables are of the same type? By explicitly checking the types of the expressions or by using the type of the expression if the first variable? |
End of migration |
fixed projectlombok#419 migrated existing delagate inspection tests to new format, adding new updated change.log
Migrated from Google Code (issue 346)
The text was updated successfully, but these errors were encountered: