public Type type_check(Table<Type> t_env,Table<Dec> v_env,boolean in_loop,ErrorList e){
		v_env = v_env.beginScope();
		Iterator<Type> iter = arg_type.iterator();
		if(fields!=null){
			for(Field_ty k : fields.list){
				Dec_var dv = new Dec_var(k.line,k.column,k.id,null,null);
				dv.the_type = iter.next();
				arg_dec.add(dv);
				v_env.put(k.id, dv);
			}
		}
		Type tmp = expr.type_check(t_env, v_env, false, e);
		if(!tmp.coerceTo(return_type)){
			e.add_error("Type mismatch for return type of function "+id, expr.line, expr.column, "typing");
		}
		v_env = v_env.endScope();
		return return_type;
	}