Binder\Binder_Conversions.cs (10)
539switch (type.TypeKind)
2551Debug.Assert(delegateType is NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { HasUseSiteError: false } }
2552|| delegateType.TypeKind == TypeKind.FunctionPointer,
2573Error(diagnostics, getMethodMismatchErrorCode(delegateType.TypeKind), errorLocation, method, delegateType);
2604delegateType.TypeKind,
2614Error(diagnostics, getMethodMismatchErrorCode(delegateType.TypeKind), errorLocation, method, delegateType);
2622Error(diagnostics, getRefMismatchErrorCode(delegateType.TypeKind), errorLocation, method, delegateType);
2633delegateType.TypeKind,
2737Debug.Assert(Conversions.IsAssignableFromMulticastDelegate(delegateOrFuncPtrType, ref discardedUseSiteInfo) || delegateOrFuncPtrType.TypeKind == TypeKind.Delegate || delegateOrFuncPtrType.TypeKind == TypeKind.FunctionPointer);
Symbols\TypeSymbolExtensions.cs (31)
62if (type.TypeKind != TypeKind.TypeParameter)
108if (type.TypeKind == TypeKind.TypeParameter)
213return type.TypeKind == TypeKind.Enum;
306switch (type.TypeKind)
326return type.TypeKind == TypeKind.Class;
332return type.TypeKind == TypeKind.Struct;
348return type.TypeKind == TypeKind.Dynamic;
354return type.TypeKind == TypeKind.TypeParameter;
360return type.TypeKind == TypeKind.Array;
366return type.TypeKind == TypeKind.Array && ((ArrayTypeSymbol)type).IsSZArray;
391return type.TypeKind == TypeKind.FunctionPointer;
396switch (type.TypeKind)
409switch (type.TypeKind)
561return type.TypeKind == TypeKind.Delegate;
675switch (type.TypeKind)
750switch (current.TypeKind)
808switch (current.TypeKind)
917throw ExceptionUtilities.UnexpectedValue(current.TypeKind);
1140if (ReferenceEquals(parent2.OriginalDefinition, parent1OriginalDefinition) || parent1OriginalDefinition.TypeKind == TypeKind.Submission && parent2.TypeKind == TypeKind.Submission)
1180(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2));
1191(type, parameterContainer, unused) => type.TypeKind == TypeKind.TypeParameter && (object)type.ContainingSymbol == (object)parameterContainer;
1200(type, parameters, unused) => type.TypeKind == TypeKind.TypeParameter && parameters.Contains((TypeParameterSymbol)type);
1209(type, _, _) => type.TypeKind == TypeKind.TypeParameter && type.ContainingSymbol is MethodSymbol;
1220private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic;
1258type.VisitType((TypeSymbol t, object? _, bool _) => t.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer, null) is object;
1457switch (type.TypeKind)
1479throw ExceptionUtilities.UnexpectedValue(type.TypeKind);
1619return type.IsReferenceType && type.TypeKind != TypeKind.TypeParameter;
1627return type.IsValueType && type.TypeKind != TypeKind.TypeParameter;
1953if (taskType.TypeKind == TypeKind.Error)