public Tuple<Env, String, Int32> GetEnumerator(Env env, Int32 idx) {
if (this.Init.IsNone) {
return new Tuple<Env, String, Int32>(env, this.Name, idx);
}
ABT.Expr init = this.Init.Value.GetExpr(env);
init = ABT.TypeCast.MakeCast(init, new LongType());
if (!init.IsConstExpr) {
throw new InvalidOperationException("Error: expected constant integer");
}
Int32 initIdx = ((ConstLong)init).Value;
return new Tuple<Env, String, int>(env, this.Name, initIdx);
}
}