Binder\Binder_Conversions.cs (10)
778switch (type.TypeKind)
2811Debug.Assert(delegateType is NamedTypeSymbol { TypeKind: TypeKind.Delegate, DelegateInvokeMethod: { HasUseSiteError: false } }
2812|| delegateType.TypeKind == TypeKind.FunctionPointer,
2833Error(diagnostics, getMethodMismatchErrorCode(delegateType.TypeKind), errorLocation, method, delegateType);
2864delegateType.TypeKind,
2874Error(diagnostics, getMethodMismatchErrorCode(delegateType.TypeKind), errorLocation, method, delegateType);
2882Error(diagnostics, getRefMismatchErrorCode(delegateType.TypeKind), errorLocation, method, delegateType);
2893delegateType.TypeKind,
2997Debug.Assert(Conversions.IsAssignableFromMulticastDelegate(delegateOrFuncPtrType, ref discardedUseSiteInfo) || delegateOrFuncPtrType.TypeKind == TypeKind.Delegate || delegateOrFuncPtrType.TypeKind == TypeKind.FunctionPointer);
Symbols\TypeSymbolExtensions.cs (31)
71if (type.TypeKind != TypeKind.TypeParameter)
117if (type.TypeKind == TypeKind.TypeParameter)
222return type.TypeKind == TypeKind.Enum;
315switch (type.TypeKind)
335return type.TypeKind == TypeKind.Class;
341return type.TypeKind == TypeKind.Struct;
357return type.TypeKind == TypeKind.Dynamic;
363return type.TypeKind == TypeKind.TypeParameter;
369return type.TypeKind == TypeKind.Array;
375return type.TypeKind == TypeKind.Array && ((ArrayTypeSymbol)type).IsSZArray;
400return type.TypeKind == TypeKind.FunctionPointer;
405switch (type.TypeKind)
418switch (type.TypeKind)
570return type.TypeKind == TypeKind.Delegate;
699switch (type.TypeKind)
774switch (current.TypeKind)
832switch (current.TypeKind)
941throw ExceptionUtilities.UnexpectedValue(current.TypeKind);
1164if (ReferenceEquals(parent2.OriginalDefinition, parent1OriginalDefinition) || parent1OriginalDefinition.TypeKind == TypeKind.Submission && parent2.TypeKind == TypeKind.Submission)
1204(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2));
1215(type, parameterContainer, unused) => type.TypeKind == TypeKind.TypeParameter && (object)type.ContainingSymbol == (object)parameterContainer;
1224(type, parameters, unused) => type.TypeKind == TypeKind.TypeParameter && parameters.Contains((TypeParameterSymbol)type);
1233(type, _, _) => type.TypeKind == TypeKind.TypeParameter && type.ContainingSymbol is MethodSymbol;
1244private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic;
1282type.VisitType((TypeSymbol t, object? _, bool _) => t.TypeKind is TypeKind.Pointer or TypeKind.FunctionPointer, null) is object;
1507switch (type.TypeKind)
1529throw ExceptionUtilities.UnexpectedValue(type.TypeKind);
1669return type.IsReferenceType && type.TypeKind != TypeKind.TypeParameter;
1677return type.IsValueType && type.TypeKind != TypeKind.TypeParameter;
2003if (taskType.TypeKind == TypeKind.Error)