blob: bf76fb5e8aa3625c6217f3d070ae7a35a683daee [file] [log] [blame]
package groovy.bugs
/**
* @author Rod Cope
* @version $Revision$
*/
class RodsBug extends GroovyTestCase {
void testBug() {
doTest(true)
/*
def x = 1
if (x > 0) {
String name = "Rod"
println(name)
}
*/
}
void testBug2() {
def x = 1
if (x > 0) {
//String name = "Rod"
def name = "Rod"
println(name)
}
}
void doTest(flag) {
if (flag) {
String name = "Rod"
//def name = "Rod"
doAssert(name)
}
}
void doTest() {
String name = "Rod"
doAssert(name)
}
void doAssert(text) {
assert text != null
}
}