public void CompileAndEvaluateInnerBlockWithClosure()
{
Machine machine = new Machine();
IClass cls = CompileClass(
"Adder",
new string[] { },
new string[] { "add: aVector | sum | sum := 0. aVector do: [ :x | sum := sum + x ]. ^sum" });
Assert.IsNotNull(cls);
IMethod method = cls.GetInstanceMethod("add:");
Assert.IsNotNull(method);
IObject obj = (IObject)cls.NewObject();
Assert.AreEqual(6, method.Execute(machine, obj, new object[] { new int[] { 1, 2, 3 } }));
}