func.staticAnalysis(statEnv, _params);
this._type = func.getReturnType(_params);
final EvaluationPolicy evalPolicy = func.getEvaluationPolicy();
if(evalPolicy == EvaluationPolicy.eager) {
Sequence preEvaled = eval(ValueSequence.EMPTY_SEQUENCE, new DynamicContext(statEnv));
return new PreEvaluatedVariable(preEvaled, _type);
} else if(evalPolicy == EvaluationPolicy.rewritten) {
XQExpression rewritted = func.rewrite(_params, statEnv);
XQExpression analyzed = rewritted.staticAnalysis(statEnv);
return analyzed;
} else if(evalPolicy == EvaluationPolicy.threaded) {