3 import gls
.scope
.CompilableTestSupport
5 public class MultipleDefinitionOfSameVariableTest
extends CompilableTestSupport
{
7 public void testInSameBlock() {
23 public void testInSubblocks() {
36 for (i in []) { def foo=2 }
41 while (true) { def foo=2 }
45 public void testInNestedClosure() {
48 5.times { 6.times {def foo=2 }
53 5.times { 6.times {foo=2 } }
58 public void testBindingHiding() {
64 assert binding.foo == 1
68 public void testBindingAccessInMethod() {
70 def methodUsingBinding() {
83 public void testMultipleOfSameName() {