Beispiel #1
0
        public override object Call(params object[] args)
        {
            if (args.Length != 1)
            {
                throw Ops.TypeError("array expects one and only 1 argument");
            }
            if (this.type == typeof(Array))
            {
                throw Ops.TypeError("general array type is not callable");
            }

            return(ArrayOps.CreateArray(this.type.GetElementType(), args[0]));
        }