170 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)
350case 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.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)
350case 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)
350case 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)
350case 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)
797case TypeKind.TypeParameter:
Binder\Binder_Expressions.cs (4)
5308case TypeKind.TypeParameter: 8114if (leftType.TypeKind == TypeKind.TypeParameter) 9337if (receiverOpt is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 9947case TypeKind.TypeParameter:
Binder\Binder_Lookup.cs (3)
228case TypeKind.TypeParameter: 852Debug.Assert(!type.IsInterfaceType() && type.TypeKind != TypeKind.TypeParameter); 1917case TypeKind.TypeParameter:
Binder\Binder_Operators.cs (1)
5424if (targetTypeKind == TypeKind.TypeParameter)
Binder\Binder_Query.cs (1)
968if (ultimateReceiver.Type.TypeKind == TypeKind.TypeParameter)
Binder\Binder_Statements.cs (1)
2415if (targetType.TypeKind == TypeKind.TypeParameter)
Binder\ForEachLoopBinder.cs (2)
1653case TypeKind.TypeParameter: // Not specifically mentioned in the spec, but consistent with Dev10. 1844if (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)
420Debug.Assert(arrayAccess.Type.TypeKind == TypeKind.TypeParameter, "constrained call should only be used with type parameter types"); 530Debug.Assert(receiverType.TypeKind == TypeKind.TypeParameter || receiverType.IsValueType); 537return receiverType.TypeKind == TypeKind.TypeParameter && addressKind != AddressKind.Constrained;
CodeGen\EmitConversion.cs (1)
362if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } })
CodeGen\EmitExpression.cs (6)
443(receiverType.IsReferenceType && receiverType.TypeKind == TypeKind.TypeParameter) || 820Debug.Assert(thisType.TypeKind != TypeKind.TypeParameter); 1097if (elementType.TypeKind == TypeKind.TypeParameter) 2691if (left.Kind == BoundKind.ArrayAccess && left.Type.TypeKind == TypeKind.TypeParameter && !left.Type.IsValueType) 3528if (type is { TypeKind: TypeKind.TypeParameter } && constantValue.IsNull) 4156if (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)
2515return valueType.Type?.TypeKind == TypeKind.TypeParameter && 2707targetType.TypeKind == TypeKind.TypeParameter || 2796fieldOrPropertyType.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)
335TypeKind.TypeParameter => FeaturesResources.type_parameter,
RQName\RQNodeBuilder.cs (1)
289else if (symbol.TypeKind == 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)
350case TypeKind.TypeParameter:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
75new SymbolKindOrTypeKind(TypeKind.TypeParameter),
Microsoft.CodeAnalysis.VisualBasic (44)
Analysis\FlowAnalysis\DataFlowPass.vb (1)
1279ElseIf type.TypeKind = TypeKind.TypeParameter Then
Binding\Binder_Expressions.vb (3)
2740If CaseInsensitiveComparison.Equals(leftType.Name, leftName) AndAlso leftType.TypeKind <> TYPEKIND.TypeParameter Then 2908If type.TypeKind = TYPEKIND.TypeParameter Then 3812Case TYPEKIND.TypeParameter, TYPEKIND.Interface
Binding\Binder_Lookup.vb (5)
589Case TypeKind.TypeParameter 618Case TypeKind.TypeParameter 941Case TypeKind.TypeParameter 1116Case TypeKind.TypeParameter 1710Case TypeKind.TypeParameter
Binding\Binder_ObjectInitializer.vb (1)
304Case TypeKind.TypeParameter
BoundTree\BoundNewT.vb (1)
16Debug.Assert(Type.TypeKind = TypeKind.TypeParameter)
CodeGen\EmitAddress.vb (1)
471If receiverType.TypeKind = TypeKind.TypeParameter Then
CodeGen\EmitExpression.vb (5)
317(receiverType.IsReferenceType AndAlso receiverType.TypeKind = TypeKind.TypeParameter) OrElse 519Debug.Assert(thisType.TypeKind <> TypeKind.TypeParameter) 641If elementType.TypeKind = TypeKind.TypeParameter Then 1734If ((type IsNot Nothing) AndAlso (type.TypeKind = TypeKind.TypeParameter) AndAlso constantValue.IsNull) Then 1854Return AllowedToTakeRef(left, AddressKind.Writeable) AndAlso Not (left.Kind = BoundKind.ArrayAccess AndAlso left.Type.TypeKind = TypeKind.TypeParameter)
CodeGen\EmitStatement.vb (2)
367Debug.Assert(receiver.Type.TypeKind <> TypeKind.TypeParameter) 914If (operandType IsNot Nothing) AndAlso (operandType.TypeKind = TypeKind.TypeParameter) Then
Compilation\ClsComplianceChecker.vb (2)
593Case TypeKind.Error, TypeKind.TypeParameter 619Case TypeKind.Error, TypeKind.TypeParameter
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (1)
199If propertyType.TypeKind = TypeKind.TypeParameter Then
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.vb (1)
102(receiverType.IsReferenceType AndAlso receiverType.TypeKind = TypeKind.TypeParameter) OrElse
Semantics\AccessCheck.vb (2)
446Case TypeKind.TypeParameter 511Case TypeKind.TypeParameter
Symbols\ConstraintsHelper.vb (5)
222Case TypeKind.TypeParameter 844Debug.Assert(baseType.TypeKind <> TypeKind.TypeParameter) 869Case TypeKind.TypeParameter 942Case TypeKind.TypeParameter 1122If type.TypeKind = TypeKind.TypeParameter Then
Symbols\Source\SourceNamedTypeSymbol.vb (3)
1117Case TypeKind.TypeParameter 1188Case TypeKind.TypeParameter 1239Case TypeKind.TypeParameter
Symbols\TypeParameterSymbol.vb (2)
148Return TypeKind.TypeParameter 246If (constraint.TypeKind = TypeKind.TypeParameter) Then
Symbols\TypeSymbolExtensions.vb (9)
412Case TypeKind.Interface, TypeKind.TypeParameter, TypeKind.Unknown 637Case TypeKind.TypeParameter 746If type.TypeKind = TypeKind.TypeParameter Then 761Return (type.TypeKind = TypeKind.TypeParameter) AndAlso 774Return (type.TypeKind = TypeKind.TypeParameter) AndAlso 790Private ReadOnly s_isTypeParameterFunc As Func(Of TypeSymbol, Object, Boolean) = Function(type, arg) (type.TypeKind = TypeKind.TypeParameter) 856TypeKind.TypeParameter, 1131If type.TypeKind = TypeKind.TypeParameter Then 1139If type.TypeKind = TypeKind.TypeParameter Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
247If parameter.Type.TypeKind <> TypeKind.TypeParameter Then
Microsoft.CodeAnalysis.VisualBasic.Features (1)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
180If delegateSymbol.Arity <> 0 AndAlso delegateSymbol.TypeArguments.Any(Function(n) n.TypeKind = TypeKind.TypeParameter) Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
247If parameter.Type.TypeKind <> TypeKind.TypeParameter Then
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)
350case 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.Options.SourceGeneration (1)
Parser.cs (1)
218if (ta.TypeKind == TypeKind.TypeParameter)
Microsoft.Interop.SourceGeneration (2)
ManagedTypeInfo.cs (1)
68if (type.TypeKind == TypeKind.TypeParameter)
TypeSymbolExtensions.cs (1)
104if (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)
350case 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)
Roslyn.Diagnostics.VisualBasic.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
247If parameter.Type.TypeKind <> TypeKind.TypeParameter Then