ajwang / groovypptest

Automatically exported from code.google.com/p/groovypptest
0 stars 0 forks source link

Collection.leftShift() not working in MIXED mode #339

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Run ./gradlew test in the attached project

Original issue reported on code.google.com by p.ledbr...@gmail.com on 27 Jan 2011 at 11:01

GoogleCodeExporter commented 8 years ago
The test project...

Original comment by p.ledbr...@gmail.com on 27 Jan 2011 at 11:02

Attachments:

GoogleCodeExporter commented 8 years ago
This has already been fixed under 
http://code.google.com/p/groovypptest/issues/detail?id=330.

Can you upgrade and try?

Original comment by roshanda...@gmail.com on 27 Jan 2011 at 11:13

GoogleCodeExporter commented 8 years ago
Please try with 0.4.152

Original comment by alex.tka...@gmail.com on 27 Jan 2011 at 11:16

GoogleCodeExporter commented 8 years ago
My bad. I should have realised when I got a different error message.

Simply change the Groovy++ version in build.gradle to 0.4.150 and run the test 
again - you'll see a different error (the one that originally prompted me to 
create the test case).

Original comment by p.ledbr...@gmail.com on 27 Jan 2011 at 11:30

GoogleCodeExporter commented 8 years ago
The error with 0.4.150/2 is:

gpp-bug-339/src/main/groovy/org/example/MyClass.groovy: 7: Cannot convert 
Integer to ArrayList<Object>
 @ line 7, column 25.
           result << [] << 10
                           ^

1 error

FAILURE: Build failed with an exception.

Original comment by p.ledbr...@gmail.com on 27 Jan 2011 at 11:37

GoogleCodeExporter commented 8 years ago
Yes, this new error looks like a valid one. So, the error now is that in the 
mixed mode 1) works but 2) doesn't:

-----------------------1)-----------------------
def result = []
result << []
result << 10
-----------------------2)-----------------------
def result = []
result << [] << 10
----------------------------------------------

Original comment by roshanda...@gmail.com on 27 Jan 2011 at 11:42

GoogleCodeExporter commented 8 years ago

Original comment by alex.tka...@gmail.com on 27 Jan 2011 at 1:01

GoogleCodeExporter commented 8 years ago

Original comment by alex.tka...@gmail.com on 6 Feb 2011 at 5:37