Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-3
-
None
-
None
Description
import java.io.File
dirname = 'dir'
dir = new File("${dirname}") //this works
println new File(dir, 'file10.txt') // this works
number = 10
println new File(dir, "file${number}.txt") // this fails
It appears that GroovyString is coerced to String if it's the only parameter but not if it's one of several parameters.