169 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 ||
ILLink.RoslynAnalyzer (1)
TrimAnalysis\SingleValueExtensions.cs (1)
19 TypeKind.TypeParameter =>
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
401case TypeKind.TypeParameter:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
80new SymbolKindOrTypeKind(TypeKind.TypeParameter),
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
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)
585case TypeKind.TypeParameter:
Binder\Binder_Crefs.cs (1)
598case TypeKind.TypeParameter:
Binder\Binder_Expressions.cs (4)
5165case TypeKind.TypeParameter: 7839if (leftType.TypeKind == TypeKind.TypeParameter) 8707if (receiverOpt is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 9299case TypeKind.TypeParameter:
Binder\Binder_Lookup.cs (3)
184case TypeKind.TypeParameter: 806Debug.Assert(!type.IsInterfaceType() && type.TypeKind != TypeKind.TypeParameter); 1867case TypeKind.TypeParameter:
Binder\Binder_Operators.cs (1)
3744if (targetTypeKind == TypeKind.TypeParameter)
Binder\Binder_Query.cs (1)
979if (ultimateReceiver.Type.TypeKind == TypeKind.TypeParameter)
Binder\Binder_Statements.cs (1)
2369if (targetType.TypeKind == TypeKind.TypeParameter)
Binder\ForEachLoopBinder.cs (2)
1604case TypeKind.TypeParameter: // Not specifically mentioned in the spec, but consistent with Dev10. 1794if (type.TypeKind == TypeKind.TypeParameter)
Binder\Semantics\Conversions\ConversionsBase.cs (2)
2671case TypeKind.TypeParameter: 3310if ((source.TypeKind == TypeKind.TypeParameter) &&
Binder\Semantics\Operators\OperatorFacts.cs (1)
23case TypeKind.TypeParameter:
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (3)
488if (type.TypeKind != TypeKind.TypeParameter) return false; 2256else if (source.TypeKind == TypeKind.TypeParameter) 2300case 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)
331if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } })
CodeGen\EmitExpression.cs (7)
443(receiverType.IsReferenceType && receiverType.TypeKind == TypeKind.TypeParameter) || 809Debug.Assert(thisType.TypeKind != TypeKind.TypeParameter); 1086if (elementType.TypeKind == TypeKind.TypeParameter) 1668if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 2654if (left.Kind == BoundKind.ArrayAccess && left.Type.TypeKind == TypeKind.TypeParameter && !left.Type.IsValueType) 3480if (((object)type != null) && (type.TypeKind == TypeKind.TypeParameter) && constantValue.IsNull) 4106if (load.ConstrainedToTypeOpt is not { TypeKind: TypeKind.TypeParameter })
CodeGen\EmitStatement.cs (1)
180if (exprType?.TypeKind == TypeKind.TypeParameter)
CodeGen\Optimizer.cs (2)
1172if ((method.IsAbstract || method.IsVirtual) && receiver is BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } } typeExpression) 2263if (receiverOpt is BoundTypeExpression { AliasOpt: null, BoundContainingTypeOpt: null, BoundDimensionsOpt: { IsEmpty: true }, Type: { TypeKind: TypeKind.TypeParameter } } typeExpression)
Compiler\ClsComplianceChecker.cs (1)
996case TypeKind.TypeParameter:
FlowAnalysis\EmptyStructTypeCache.cs (1)
236case TypeKind.TypeParameter:
FlowAnalysis\NullableWalker.cs (3)
2356return valueType.Type?.TypeKind == TypeKind.TypeParameter && 2548targetType.TypeKind == TypeKind.TypeParameter || 2633fieldOrPropertyType.TypeKind == TypeKind.TypeParameter ||
Symbols\ConstantValueUtils.cs (1)
89if (typeSymbol.TypeKind == TypeKind.TypeParameter)
Symbols\ConstraintsHelper.cs (5)
168case TypeKind.TypeParameter: 242if (underlyingType.TypeKind == TypeKind.TypeParameter) 1172else if (typeArgument.TypeKind == TypeKind.TypeParameter) 1356if (typeArgument.TypeKind == TypeKind.TypeParameter) 1471case TypeKind.TypeParameter:
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
92case TypeKind.TypeParameter:
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
600case TypeKind.TypeParameter:
Symbols\Symbol_Attributes.cs (1)
85case TypeKind.TypeParameter:
Symbols\SymbolExtensions.cs (1)
251if (type.TypeKind == TypeKind.TypeParameter)
Symbols\TypeParameterSymbol.cs (4)
199return TypeKind.TypeParameter; 393if (constraint.TypeKind == TypeKind.TypeParameter) 403Debug.Assert(constraint.TypeKind != TypeKind.TypeParameter); 484if (constraintType.TypeKind == TypeKind.TypeParameter)
Symbols\TypeSymbol.cs (2)
108var interfaces = (baseType.TypeKind == TypeKind.TypeParameter) ? ((TypeParameterSymbol)baseType).EffectiveInterfacesNoUseSiteDiagnostics : baseType.InterfacesNoUseSiteDiagnostics(); 344var interfaces = (baseType.TypeKind == TypeKind.TypeParameter) ? ((TypeParameterSymbol)baseType).EffectiveInterfacesNoUseSiteDiagnostics : baseType.InterfacesNoUseSiteDiagnostics();
Symbols\TypeSymbolExtensions.cs (12)
71if (type.TypeKind != TypeKind.TypeParameter) 117if (type.TypeKind == TypeKind.TypeParameter) 363return type.TypeKind == TypeKind.TypeParameter; 424case TypeKind.TypeParameter: 835case TypeKind.TypeParameter: 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; 1525case TypeKind.TypeParameter: 1669return type.IsReferenceType && type.TypeKind != TypeKind.TypeParameter; 1677return 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\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
442if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.NameGenerator.cs (1)
112if (type.TypeKind == TypeKind.TypeParameter)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\ExpressionBodiedMemberTests.cs (1)
259Assert.Equal(TypeKind.TypeParameter, semanticInfo.Type.TypeKind);
Semantics\FunctionPointerTests.cs (3)
1940Assert.Equal(TypeKind.TypeParameter, m1InvocationSymbol.TypeArguments[0].TypeKind); 1942Assert.Equal(TypeKind.TypeParameter, functionPointer.Signature.ReturnType.TypeKind); 1943Assert.Equal(TypeKind.TypeParameter, functionPointer.Signature.Parameters[0].Type.TypeKind);
Semantics\LambdaTests.cs (1)
5639Assert.Equal(TypeKind.TypeParameter, expectedType.TypeKind);
Semantics\NativeIntegerTests.cs (1)
15449Assert.Equal(TypeKind.TypeParameter, symbol.TypeKind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Compilation\GetSemanticInfoTests.cs (3)
1819Assert.Equal(TypeKind.TypeParameter, ((IMethodSymbol)candidate.OriginalDefinition).Parameters.Last().Type.TypeKind); 4683Assert.Equal(TypeKind.TypeParameter, paramType0.TypeKind); 4728Assert.Equal(TypeKind.TypeParameter, paramType0.TypeKind);
Compilation\SemanticModelGetSemanticInfoTests.cs (3)
11497Assert.Equal(TypeKind.TypeParameter, semanticInfo.Type.TypeKind); 11499Assert.Equal(TypeKind.TypeParameter, semanticInfo.ConvertedType.TypeKind); 12322Assert.Equal(TypeKind.TypeParameter, semanticInfo.Type.TypeKind);
DocumentationComments\CrefTests.cs (5)
1602.Single(method => method.Parameters.Single().Type.TypeKind == TypeKind.TypeParameter); 1735Single(method => method.Parameters.Single().Type.TypeKind == TypeKind.TypeParameter); 1739Assert.Equal(TypeKind.TypeParameter, actualSymbol.GetParameterTypes().Single().Type.TypeKind); 1761Single(method => method.Parameters.Single().Type.TypeKind == TypeKind.TypeParameter); 1765Assert.Equal(TypeKind.TypeParameter, actualSymbol.GetParameterTypes().Single().Type.TypeKind);
Symbols\ExtensionMethodTests.cs (1)
55Assert.Equal(TypeKind.TypeParameter, parameter.Type.TypeKind);
Symbols\GenericConstraintTests.cs (1)
4932if (t.TypeKind == TypeKind.TypeParameter)
Symbols\Metadata\PE\LoadingGenericTypeParameters.cs (1)
75Assert.Equal(TypeKind.TypeParameter, varC1_T.TypeKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
UsesIsNullableVisitor.cs (1)
196case TypeKind.TypeParameter:
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
442if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
Microsoft.CodeAnalysis.Features (2)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
346TypeKind.TypeParameter => FeaturesResources.type_parameter,
RQName\RQNodeBuilder.cs (1)
289else if (symbol.TypeKind == 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 2904If type.TypeKind = TYPEKIND.TypeParameter Then 3808Case 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)
296(receiverType.IsReferenceType AndAlso receiverType.TypeKind = TypeKind.TypeParameter) OrElse 498Debug.Assert(thisType.TypeKind <> TypeKind.TypeParameter) 620If elementType.TypeKind = TypeKind.TypeParameter Then 1713If ((type IsNot Nothing) AndAlso (type.TypeKind = TypeKind.TypeParameter) AndAlso constantValue.IsNull) Then 1833Return 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)
184If propertyType.TypeKind = TypeKind.TypeParameter Then
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.vb (1)
107(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)
1110Case TypeKind.TypeParameter 1181Case TypeKind.TypeParameter 1232Case 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\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
256If parameter.Type.TypeKind <> TypeKind.TypeParameter Then
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
SymbolExtensions.vb (1)
27If 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.Semantic.UnitTests (5)
Semantics\GetExtendedSemanticInfoTests.vb (3)
9392Assert.Equal(TypeKind.TypeParameter, semanticSummary.Type.TypeKind) 9968Assert.Equal(TypeKind.TypeParameter, semanticSummary.Type.TypeKind) 9970Assert.Equal(TypeKind.TypeParameter, semanticSummary.ConvertedType.TypeKind)
Semantics\IFOperatorTest.vb (2)
1163semanticInfos(1).ConvertedType.TypeKind <> TypeKind.TypeParameter AndAlso 1164semanticInfos(2).ConvertedType.TypeKind <> TypeKind.TypeParameter) Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Metadata\PE\LoadingGenericTypeParameters.vb (1)
74Assert.Equal(TypeKind.TypeParameter, C1_T.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
256If parameter.Type.TypeKind <> TypeKind.TypeParameter Then
Microsoft.CodeAnalysis.Workspaces (5)
Classification\ClassificationExtensions.cs (1)
18TypeKind.TypeParameter => ClassificationTypeNames.TypeParameterName,
Recommendations\AbstractRecommendationServiceRunner.cs (1)
449if (originalConstraintType.TypeKind == TypeKind.TypeParameter)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (1)
401case TypeKind.TypeParameter:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
80new SymbolKindOrTypeKind(TypeKind.TypeParameter),
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)
Microsoft.VisualStudio.LanguageServices (4)
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (1)
91if (typeSymbol.TypeKind is TypeKind.Unknown or TypeKind.Error or TypeKind.TypeParameter ||
Library\VsNavInfo\NavInfoFactory.cs (1)
100TypeKind.TypeParameter)
Progression\GraphNodeIdCreation.cs (2)
78if (symbol.TypeKind == TypeKind.TypeParameter) 246else if (underlyingType.TypeKind != TypeKind.TypeParameter)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\VisualBasicCodeModelService.vb (1)
809If typeSymbol.TypeKind = TypeKind.TypeParameter Then