Details
-
Question
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
3.0.0-rc-2
-
None
-
None
Description
Playing with the failures which Groovy 3 brought to Spock tests itself,
I noticed that Groovy 3 no longer rejects += and -= if used in an
assertion statement:
//Groovy 3-rc2 def a = 1 assert a += 1 //passes assert a == 2 //passes
While it behaves consistently, I wonder if that change was introduced purposely (it was failing in Groovy 2) and should be documented or the check should be enhanced?
//Groovy 2.5 startup failed: Script1.groovy: 3: unexpected token: += @ line 1, column 10. assert a += 1 ^1 error
Follow up of the mailing list thread.