상속: System.Compiler.ExpressionStatement
예제 #1
0
        private AsyncMethodCall VisitAsync(AsyncMethodCall async)
        {
            WriteLine("async");
            this.VisitExpressionStatement((ExpressionStatement)async);

            return async;
        }
예제 #2
0
 private AsyncMethodCall VisitAsync(AsyncMethodCall async)
 {
     if (async == null) return null;
     AsyncMethodCall result = (AsyncMethodCall)base.VisitExpressionStatement(async);
     return result;
 }
예제 #3
0
 private AsyncMethodCall VisitAsync(AsyncMethodCall async)
 {
     return (AsyncMethodCall)this.VisitExpressionStatement((ExpressionStatement)async);
 }
예제 #4
0
        private AsyncMethodCall VisitAsync(AsyncMethodCall async)
        {
            if (async == null) return null;
            async = (AsyncMethodCall)this.VisitExpressionStatement((ExpressionStatement)async);

            if (async != null && async.Expression is MethodCall)
            {
                ZMethod method = (ZMethod)((MemberBinding)async.Callee).BoundMember;

                if (method.ReturnType != SystemTypes.Void)
                {
                    this.HandleError(async, Error.InvalidAsyncCallTarget);
                    //return null;  // this is just a warning, for now
                }

                for (int i = 0, n = method.Parameters.Count; i < n; i++)
                {
                    Parameter param = method.Parameters[i];
                    if ((param.Flags & ParameterFlags.Out) != 0)
                    {
                        this.HandleError(async, Error.InvalidAsyncCallTarget);
                        //return null;  // this is just a warning, for now
                    }
                }
            }

            return async;
        }