#!/bin/java bsh.Interpreter

source("TestHarness.bsh");

al = new ArrayList();
al.add("foo");
al.add("bar");
al.add("gee");

for( a : al )
	print( a );

assert( a.equals("gee") );

for( a : this.al )
	print( a );

al.add("goo");

for( String a : al )
{
	print( a );
	if ( a.equals("goo") )
		flag();
}

for (int i = new Integer(0).intValue(); i < 3; i++)
    print(i);

// the typed vars don't leak
assert( a.equals("gee") );
assert( flag() == 1 );

assert( isEvalError("for( a : 42 )") );

complete();
