public bool ContainsBoundGenericClosure()
 {
     foreach (var arg in ParameterLists.Last())
     {
         if (arg.TypeSpec.ContainsBoundGenericClosure())
         {
             return(true);
         }
     }
     return(ReturnTypeSpec.ContainsBoundGenericClosure());
 }
Exemple #2
0
        internal string ParametersToString()
        {
            var builder = new StringBuilder();
            var first   = true;

            foreach (var parm in ParameterLists.Last())
            {
                if (!first)
                {
                    builder.Append(", ");
                }
                else
                {
                    first = false;
                }
                // forms
                // public_name private_name: [inout] Type
                // public_name: [inout] Type
                // _ private_name: [inout] Type
                if (parm.PublicName == parm.PrivateName)
                {
                    builder.Append(parm.PublicName);
                }
                else if (parm.NameIsRequired)
                {
                    builder.Append(parm.PublicName).Append(" ").Append(parm.PrivateName);
                }
                else
                {
                    builder.Append("_ ").Append(parm.PrivateName);
                }
                builder.Append(": ");
                if (parm.IsInOut || parm.TypeSpec.IsInOut)
                {
                    builder.Append("inout ");
                }
                builder.Append(parm.TypeSpec);
            }
            return(builder.ToString());
        }