Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.0-rc-1
-
None
Description
Observed on 2.2.2, but maybe affects all releases. To reproduce:
import groovy.transform.CompileStatic
@CompileStatic class Foo { def static main(String[] args) { boolean b = [false] assert b } }
fails, but should succeed given List should be coerced to Boolean via asBoolean()
Also see discussion at
http://comments.gmane.org/gmane.comp.lang.groovy.user/64604
Attachments
Issue Links
- relates to
-
GROOVY-6803 CompileStatic: ListAssignment for String takes precendence over Coercion when statically compiling
- Closed