Example #1
0
 /// <summary>
 /// Gets type kind as string, e.g. "class", "interface", "trait", ..
 /// </summary>
 public static string GetTypeKindKeyword(this TypeSymbol t)
 {
     if (t.IsInterfaceType())
     {
         return("interface");
     }
     if (t.IsTraitType())
     {
         return("trait");
     }
     if (t.IsStructType())
     {
         return("struct");
     }
     if (t.IsEnumType())
     {
         return("enum");
     }
     return("class");
 }
Example #2
0
        public SynthesizedTraitMethodSymbol(TypeSymbol containingType, string name, MethodSymbol traitmethod, Accessibility accessibility, bool isfinal = true)
            : base(containingType, name, traitmethod.IsStatic, !traitmethod.IsStatic && !containingType.IsTraitType(), null, accessibility, isfinal)
        {
            _parameters = default(ImmutableArray <ParameterSymbol>);

            this.ForwardedCall = traitmethod;
        }