blob: 10e26f202b383522be980a67dc6419643d2aa25a [file] [log] [blame]
/**
* @version $Revision$
*/
class AssignmentInsideExpressionBug extends GroovyTestCase {
void testBug() {
if ((x = someMethod()) != null) {
println x
}
if ((y = getFoo()) > 5) {
println "y is greater than 5"
}
/** @todo uncomment when the parser allows this
a = b = 123
assert a == 123
assert b == 123
*/
}
someMethod() {
return "worked!"
}
getFoo() {
return 7
}
}