protected internal override void CheckSemantics(AstHelper astHelper) { FunctionName.CheckSemantics(astHelper); foreach (Expression expression in Parameters) { expression.CheckSemantics(astHelper); } Type[] parameterTypes = Parameters.Select(param => param.Type).ToArray(); if (!astHelper.Errors.Check(new FunctionNotDefinedError(FunctionName.Name, parameterTypes, astHelper.Functions, Start))) { FunctionReference functionReference = astHelper.Functions[FunctionName.Name, parameterTypes]; _type = functionReference.ReturnType; _pointer = functionReference.Function; } else { // if there is any error _type = typeof(Null); _pointer = MAst.Empty(); } }