Example #1
0
        public void ResetType()
        {
            Type[] paramTypes = null;
            if (this.Parameters != null)
            {
                paramTypes = new Type[this.Parameters.Length];
                for (int i = 0; i < this.Parameters.Length; i++)
                {
                    var parameter = this.Parameters[i];
                    paramTypes[i] = parameter.Type;
                }
            }

            Type[] firstGroupGenericTypeArguments  = null;
            Type[] secondGroupGenericTypeArguments = null;
            if (this.returnValueTypes == null)
            {
                firstGroupGenericTypeArguments = null;
            }
            else if (this.returnValueTypes.Length == 0)
            {
                firstGroupGenericTypeArguments = new[] { Type.Void };
            }
            else
            {
                firstGroupGenericTypeArguments = this.returnValueTypes;
            }

            if (paramTypes == null)
            {
                secondGroupGenericTypeArguments = null;
            }
            else if (paramTypes.Length == 0)
            {
                secondGroupGenericTypeArguments = new[] { Type.Void };
            }
            else
            {
                secondGroupGenericTypeArguments = paramTypes;
            }

            this.Type = new GenericityType(Type.Function.Name, "", firstGroupGenericTypeArguments, secondGroupGenericTypeArguments, TypeCategory.Function);
        }
Example #2
0
        public override Type GetTLType(PackagesContext packagesContext)
        {
            var types = new TypeLua.Project.Types.Type[] { this.Type.Symbol.GetTLType(packagesContext), this.Type_2.Symbol.GetTLType(packagesContext) };

            return(new GenericityType(this.Hashtable.Symbol, "", types, null, TypeCategory.Value));
        }