139 references to TypeParameter
ConfigurationSchemaGenerator (2)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (2)
69type.TypeKind is TypeKind.TypeParameter or TypeKind.Pointer or TypeKind.Error || 841if (typeArg.TypeKind is TypeKind.TypeParameter or TypeKind.Error ||
GenerateDocumentationAndConfigFiles (6)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (2)
113if (type1.TypeKind == TypeKind.TypeParameter && 114type2.TypeKind == TypeKind.TypeParameter &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
86if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
319case TypeKind.TypeParameter:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
60public override TypeKind TypeKind => TypeKind.TypeParameter;
ILLink.RoslynAnalyzer (1)
TrimAnalysis\SingleValueExtensions.cs (1)
21TypeKind.TypeParameter =>
Microsoft.Build.TaskAuthoring.Analyzer (1)
UnsupportedTaskItemTypeAnalyzer.cs (1)
100if (typeArg.TypeKind == TypeKind.TypeParameter)
Microsoft.CodeAnalysis.Analyzers (8)
MetaAnalyzers\RegisterActionAnalyzer.cs (1)
401typeArgument.TypeKind != TypeKind.TypeParameter &&
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (1)
391if (typeArgument.TypeKind != TypeKind.TypeParameter &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (2)
113if (type1.TypeKind == TypeKind.TypeParameter && 114type2.TypeKind == TypeKind.TypeParameter &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
86if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
319case TypeKind.TypeParameter:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
60public override TypeKind TypeKind => TypeKind.TypeParameter;
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (2)
113if (type1.TypeKind == TypeKind.TypeParameter && 114type2.TypeKind == TypeKind.TypeParameter &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
86if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
1349static bool IsInterfaceOrTypeParameter(ITypeSymbol? type) => type?.TypeKind is TypeKind.Interface or TypeKind.TypeParameter;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
319case TypeKind.TypeParameter:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
Microsoft.CodeAnalysis.CodeStyle (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
319case TypeKind.TypeParameter:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
60public override TypeKind TypeKind => TypeKind.TypeParameter;
Microsoft.CodeAnalysis.CSharp (70)
Binder\Binder_Constraints.cs (1)
586case TypeKind.TypeParameter:
Binder\Binder_Conversions.cs (1)
862case TypeKind.TypeParameter:
Binder\Binder_Crefs.cs (1)
803case TypeKind.TypeParameter:
Binder\Binder_Expressions.cs (4)
5323case TypeKind.TypeParameter: 8144if (leftType.TypeKind == TypeKind.TypeParameter) 10020if (receiverOpt is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 10630case TypeKind.TypeParameter:
Binder\Binder_Lookup.cs (3)
284case TypeKind.TypeParameter: 908Debug.Assert(!type.IsInterfaceType() && type.TypeKind != TypeKind.TypeParameter); 1973case TypeKind.TypeParameter:
Binder\Binder_Operators.cs (1)
5421if (targetTypeKind == TypeKind.TypeParameter)
Binder\Binder_Query.cs (1)
968if (ultimateReceiver.Type.TypeKind == TypeKind.TypeParameter)
Binder\Binder_Statements.cs (1)
2416if (targetType.TypeKind == TypeKind.TypeParameter)
Binder\ForEachLoopBinder.cs (2)
1658case TypeKind.TypeParameter: // Not specifically mentioned in the spec, but consistent with Dev10. 1849if (type.TypeKind == TypeKind.TypeParameter)
Binder\Semantics\Conversions\ConversionsBase.cs (2)
2691case TypeKind.TypeParameter: 3330if ((source.TypeKind == TypeKind.TypeParameter) &&
Binder\Semantics\Operators\OperatorFacts.cs (1)
23case TypeKind.TypeParameter:
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (3)
506if (type.TypeKind != TypeKind.TypeParameter) return false; 2286else if (source.TypeKind == TypeKind.TypeParameter) 2330case TypeKind.TypeParameter:
CodeGen\EmitAddress.cs (3)
426Debug.Assert(arrayAccess.Type.TypeKind == TypeKind.TypeParameter, "constrained call should only be used with type parameter types"); 536Debug.Assert(receiverType.TypeKind == TypeKind.TypeParameter || receiverType.IsValueType); 543return receiverType.TypeKind == TypeKind.TypeParameter && addressKind != AddressKind.Constrained;
CodeGen\EmitConversion.cs (1)
362if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } })
CodeGen\EmitExpression.cs (6)
440(receiverType.IsReferenceType && receiverType.TypeKind == TypeKind.TypeParameter) || 817Debug.Assert(thisType.TypeKind != TypeKind.TypeParameter); 1094if (elementType.TypeKind == TypeKind.TypeParameter) 2711if (left.Kind == BoundKind.ArrayAccess && left.Type.TypeKind == TypeKind.TypeParameter && !left.Type.IsValueType) 3553if (type is { TypeKind: TypeKind.TypeParameter } && constantValue.IsNull) 4181if (load.ConstrainedToTypeOpt is not { TypeKind: TypeKind.TypeParameter })
CodeGen\EmitStatement.cs (1)
180if (exprType?.TypeKind == TypeKind.TypeParameter)
Compiler\ClsComplianceChecker.cs (1)
996case TypeKind.TypeParameter:
FlowAnalysis\EmptyStructTypeCache.cs (1)
237case TypeKind.TypeParameter:
FlowAnalysis\NullableWalker.cs (3)
2559return valueType.Type?.TypeKind == TypeKind.TypeParameter && 2751targetType.TypeKind == TypeKind.TypeParameter || 2847fieldOrPropertyType.TypeKind == TypeKind.TypeParameter ||
Symbols\ConstantValueUtils.cs (1)
89if (typeSymbol.TypeKind == TypeKind.TypeParameter)
Symbols\ConstraintsHelper.cs (5)
168case TypeKind.TypeParameter: 242if (underlyingType.TypeKind == TypeKind.TypeParameter) 1197else if (typeArgument.TypeKind == TypeKind.TypeParameter) 1383if (typeArgument.TypeKind == TypeKind.TypeParameter) 1498case TypeKind.TypeParameter:
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
92case TypeKind.TypeParameter:
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
655case TypeKind.TypeParameter:
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
422case { TypeKind: TypeKind.TypeParameter, IsReferenceType: false }:
Symbols\Symbol_Attributes.cs (1)
85case TypeKind.TypeParameter:
Symbols\SymbolExtensions.cs (1)
239if (type.TypeKind == TypeKind.TypeParameter)
Symbols\TypeParameterSymbol.cs (4)
200return TypeKind.TypeParameter; 394if (constraint.TypeKind == TypeKind.TypeParameter) 404Debug.Assert(constraint.TypeKind != TypeKind.TypeParameter); 485if (constraintType.TypeKind == TypeKind.TypeParameter)
Symbols\TypeSymbol.cs (2)
110var interfaces = (baseType.TypeKind == TypeKind.TypeParameter) ? ((TypeParameterSymbol)baseType).EffectiveInterfacesNoUseSiteDiagnostics : baseType.InterfacesNoUseSiteDiagnostics(); 346var interfaces = (baseType.TypeKind == TypeKind.TypeParameter) ? ((TypeParameterSymbol)baseType).EffectiveInterfacesNoUseSiteDiagnostics : baseType.InterfacesNoUseSiteDiagnostics();
Symbols\TypeSymbolExtensions.cs (13)
72if (type.TypeKind != TypeKind.TypeParameter) 118if (type.TypeKind == TypeKind.TypeParameter) 346return type is { IsValueType: true, TypeKind: not TypeKind.TypeParameter }; 386return type.TypeKind == TypeKind.TypeParameter; 465case TypeKind.TypeParameter: 881case TypeKind.TypeParameter: 1251(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2)); 1262(type, typeParameterContainer, unused) => type.TypeKind == TypeKind.TypeParameter && (object)type.ContainingSymbol == (object)typeParameterContainer; 1271(type, parameters, unused) => type.TypeKind == TypeKind.TypeParameter && parameters.Contains((TypeParameterSymbol)type); 1318(type, _, _) => type.TypeKind == TypeKind.TypeParameter && type.ContainingSymbol is MethodSymbol; 1610case TypeKind.TypeParameter: 1754return type.IsReferenceType && type.TypeKind != TypeKind.TypeParameter; 1762return type.IsValueType && type.TypeKind != TypeKind.TypeParameter;
Symbols\TypeWithAnnotations.cs (2)
200if (typeSymbol.TypeKind != TypeKind.TypeParameter) 1068Debug.Assert(underlying.TypeKind == TypeKind.TypeParameter);
Utilities\TypeSymbolExtensions.cs (1)
183case TypeKind.TypeParameter:
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
445if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.NameGenerator.cs (1)
113if (type.TypeKind == TypeKind.TypeParameter)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
445if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
Microsoft.CodeAnalysis.Features (2)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
340TypeKind.TypeParameter => FeaturesResources.type_parameter,
RQName\RQNodeBuilder.cs (1)
289else if (symbol.TypeKind == TypeKind.TypeParameter)
Microsoft.CodeAnalysis.NetAnalyzers (14)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UseIntegralOrStringArgumentForIndexers.cs (1)
89if (paramType.TypeKind == TypeKind.TypeParameter)
Microsoft.NetCore.Analyzers\Performance\ConstantExpectedAnalyzer.cs (2)
276SpecialType.None when type.TypeKind == TypeKind.TypeParameter => true, 378case SpecialType.None when parameterSymbol.Type.TypeKind == TypeKind.TypeParameter:
Microsoft.NetCore.Analyzers\Runtime\DoNotCallEnumerableCastOrOfTypeWithIncompatibleTypesAnalyzer.cs (3)
261case (TypeKind.TypeParameter, _): 274if (castTo.TypeKind == TypeKind.TypeParameter) 280case (_, TypeKind.TypeParameter):
Microsoft.NetCore.Analyzers\Runtime\DoNotLockOnObjectsWithWeakIdentity.cs (1)
101case TypeKind.TypeParameter:
Microsoft.NetCore.Analyzers\Runtime\SerializationRulesDiagnosticAnalyzer.cs (1)
191TypeKind.TypeParameter or TypeKind.Interface => true,// The concrete type can't be determined statically,
Microsoft.NetCore.Analyzers\Usage\ProvideCorrectArgumentToEnumHasFlag.cs (2)
54invocation.Instance.Type.TypeKind != TypeKind.TypeParameter && 55conversion.Operand.Type?.TypeKind != TypeKind.TypeParameter &&
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\ISymbolExtensions.cs (2)
401if (type1.TypeKind == TypeKind.TypeParameter && 402type2.TypeKind == TypeKind.TypeParameter &&
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
113if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
1346static bool IsInterfaceOrTypeParameter(ITypeSymbol? type) => type?.TypeKind is TypeKind.Interface or TypeKind.TypeParameter;
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (2)
113if (type1.TypeKind == TypeKind.TypeParameter && 114type2.TypeKind == TypeKind.TypeParameter &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
86if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
319case TypeKind.TypeParameter:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
Microsoft.CodeAnalysis.Workspaces (5)
Classification\ClassificationExtensions.cs (1)
18TypeKind.TypeParameter => ClassificationTypeNames.TypeParameterName,
Recommendations\AbstractRecommendationServiceRunner.cs (1)
458if (originalConstraintType.TypeKind == TypeKind.TypeParameter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
319case TypeKind.TypeParameter:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
60public override TypeKind TypeKind => TypeKind.TypeParameter;
Microsoft.Extensions.Configuration.Binder.SourceGeneration (2)
ConfigurationBindingGenerator.Parser.cs (2)
70type.TypeKind is TypeKind.TypeParameter or TypeKind.Pointer or TypeKind.Error || 971if (typeArg.TypeKind is TypeKind.TypeParameter or TypeKind.Error ||
Microsoft.Extensions.Options.SourceGeneration (1)
Parser.cs (1)
328if (ta.TypeKind == TypeKind.TypeParameter)
Microsoft.Interop.SourceGeneration (2)
ManagedTypeInfo.cs (1)
59if (type.TypeKind == TypeKind.TypeParameter)
TypeSymbolExtensions.cs (1)
102if (type.TypeKind == TypeKind.TypeParameter && !type.IsReferenceType)
Roslyn.Diagnostics.Analyzers (7)
DefaultableTypeShouldHaveDefaultableFieldsAnalyzer.cs (1)
132case TypeKind.TypeParameter:
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (2)
113if (type1.TypeKind == TypeKind.TypeParameter && 114type2.TypeKind == TypeKind.TypeParameter &&
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
86if (checkTypeParameterConstraints && symbol.TypeKind == TypeKind.TypeParameter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
319case TypeKind.TypeParameter:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationTypeParameterSymbol.cs (1)
60public override TypeKind TypeKind => TypeKind.TypeParameter;
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
445if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)