168 references to TypeParameter
Microsoft.CodeAnalysis.CodeStyle (2)
EditorConfigNamingStyleParser_SymbolSpec.cs (1)
406case TypeKind.TypeParameter:
SymbolSpecification.cs (1)
88new SymbolKindOrTypeKind(TypeKind.TypeParameter),
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
CodeGenerationTypeParameterSymbol.cs (1)
70public override TypeKind TypeKind => TypeKind.TypeParameter;
Microsoft.CodeAnalysis.CSharp (73)
Binder\Binder_Constraints.cs (1)
544case TypeKind.TypeParameter:
Binder\Binder_Conversions.cs (1)
384case TypeKind.TypeParameter:
Binder\Binder_Crefs.cs (1)
598case TypeKind.TypeParameter:
Binder\Binder_Expressions.cs (4)
4454case TypeKind.TypeParameter: 6770if (leftType.TypeKind == TypeKind.TypeParameter) 7622if (receiverOpt is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 7958case 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)
3672if (targetTypeKind == TypeKind.TypeParameter)
Binder\Binder_Query.cs (1)
978if (ultimateReceiver.Type.TypeKind == TypeKind.TypeParameter)
Binder\Binder_Statements.cs (1)
2333if (targetType.TypeKind == TypeKind.TypeParameter)
Binder\ForEachLoopBinder.cs (2)
1395case TypeKind.TypeParameter: // Not specifically mentioned in the spec, but consistent with Dev10. 1580if (type.TypeKind == TypeKind.TypeParameter)
Binder\Semantics\Conversions\ConversionsBase.cs (5)
2522case TypeKind.TypeParameter: 2714if ((destination.TypeKind == TypeKind.TypeParameter) && 2751if ((destination.TypeKind == TypeKind.TypeParameter) && 3054if ((destination.TypeKind == TypeKind.TypeParameter) && 3081if ((source.TypeKind == TypeKind.TypeParameter) &&
Binder\Semantics\Operators\OperatorFacts.cs (1)
23case TypeKind.TypeParameter:
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (3)
487if (type.TypeKind != TypeKind.TypeParameter) return false; 2062else if (source.TypeKind == TypeKind.TypeParameter) 2106case TypeKind.TypeParameter:
CodeGen\EmitAddress.cs (2)
417Debug.Assert(arrayAccess.Type.TypeKind == TypeKind.TypeParameter, "constrained call should only be used with type parameter types"); 508if (receiverType.TypeKind == TypeKind.TypeParameter)
CodeGen\EmitConversion.cs (1)
330if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } })
CodeGen\EmitExpression.cs (7)
428(receiverType.IsReferenceType && receiverType.TypeKind == TypeKind.TypeParameter) || 795Debug.Assert(thisType.TypeKind != TypeKind.TypeParameter); 1057if (elementType.TypeKind == TypeKind.TypeParameter) 1628if (receiver is not BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } }) 2437if (left.Kind == BoundKind.ArrayAccess && left.Type.TypeKind == TypeKind.TypeParameter && !left.Type.IsValueType) 3258if (((object)type != null) && (type.TypeKind == TypeKind.TypeParameter) && constantValue.IsNull) 3832if (load.ConstrainedToTypeOpt is not { TypeKind: TypeKind.TypeParameter })
CodeGen\EmitStatement.cs (1)
180if (exprType?.TypeKind == TypeKind.TypeParameter)
CodeGen\Optimizer.cs (2)
1125if ((method.IsAbstract || method.IsVirtual) && receiver is BoundTypeExpression { Type: { TypeKind: TypeKind.TypeParameter } } typeExpression) 2146if (receiverOpt is BoundTypeExpression { AliasOpt: null, BoundContainingTypeOpt: null, BoundDimensionsOpt: { IsEmpty: true }, Type: { TypeKind: TypeKind.TypeParameter } } typeExpression)
Compiler\ClsComplianceChecker.cs (1)
989case TypeKind.TypeParameter:
FlowAnalysis\EmptyStructTypeCache.cs (1)
242case TypeKind.TypeParameter:
FlowAnalysis\NullableWalker.cs (3)
2289return valueType.Type?.TypeKind == TypeKind.TypeParameter && 2481targetType.TypeKind == TypeKind.TypeParameter || 2566fieldOrPropertyType.TypeKind == TypeKind.TypeParameter ||
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
439if (type.IsReferenceType || type.TypeKind == TypeKind.TypeParameter) return true; // type parameter or reference type
Symbols\ConstantValueUtils.cs (1)
90if (typeSymbol.TypeKind == TypeKind.TypeParameter)
Symbols\ConstraintsHelper.cs (5)
139case TypeKind.TypeParameter: 213if (underlyingType.TypeKind == TypeKind.TypeParameter) 1094else if (typeArgument.TypeKind == TypeKind.TypeParameter) 1270if (typeArgument.TypeKind == TypeKind.TypeParameter) 1385case TypeKind.TypeParameter:
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
93case TypeKind.TypeParameter:
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
600case TypeKind.TypeParameter:
Symbols\Symbol_Attributes.cs (1)
85case TypeKind.TypeParameter:
Symbols\SymbolExtensions.cs (1)
250if (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 (11)
63if (type.TypeKind != TypeKind.TypeParameter) 109if (type.TypeKind == TypeKind.TypeParameter) 342return type.TypeKind == TypeKind.TypeParameter; 756case TypeKind.TypeParameter: 1116(type, parameter, unused) => type.TypeKind == TypeKind.TypeParameter && (parameter is null || TypeSymbol.Equals(type, parameter, TypeCompareKind.ConsiderEverything2)); 1127(type, parameterContainer, unused) => type.TypeKind == TypeKind.TypeParameter && (object)type.ContainingSymbol == (object)parameterContainer; 1136(type, parameters, unused) => type.TypeKind == TypeKind.TypeParameter && parameters.Contains((TypeParameterSymbol)type); 1145(type, _, _) => type.TypeKind == TypeKind.TypeParameter && type.ContainingSymbol is MethodSymbol; 1413case TypeKind.TypeParameter: 1578return type.IsReferenceType && type.TypeKind != TypeKind.TypeParameter; 1586return type.IsValueType && type.TypeKind != TypeKind.TypeParameter;
Symbols\TypeWithAnnotations.cs (2)
192if (typeSymbol.TypeKind != TypeKind.TypeParameter) 935Debug.Assert(underlying.TypeKind == TypeKind.TypeParameter);
Utilities\TypeSymbolExtensions.cs (1)
183case TypeKind.TypeParameter:
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
SemanticModelExtensions.cs (1)
440if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (1)
ExpressionCompilerTests.cs (1)
2156Assert.Equal(TypeKind.TypeParameter, returnType.TypeKind);
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)
1918Assert.Equal(TypeKind.TypeParameter, m1InvocationSymbol.TypeArguments[0].TypeKind); 1920Assert.Equal(TypeKind.TypeParameter, functionPointer.Signature.ReturnType.TypeKind); 1921Assert.Equal(TypeKind.TypeParameter, functionPointer.Signature.Parameters[0].Type.TypeKind);
Semantics\LambdaTests.cs (1)
5602Assert.Equal(TypeKind.TypeParameter, expectedType.TypeKind);
Semantics\NativeIntegerTests.cs (1)
15423Assert.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)
4935if (t.TypeKind == TypeKind.TypeParameter)
Symbols\Metadata\PE\LoadingGenericTypeParameters.cs (1)
74Assert.Equal(TypeKind.TypeParameter, varC1_T.TypeKind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
UsesIsNullableVisitor.cs (1)
196case TypeKind.TypeParameter:
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
SemanticModelExtensions.cs (1)
440if (parameter.Type.OriginalDefinition.TypeKind != TypeKind.TypeParameter)
Microsoft.CodeAnalysis.Features (2)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
351TypeKind.TypeParameter => FeaturesResources.type_parameter,
RQName\RQNodeBuilder.cs (1)
289else if (symbol.TypeKind == TypeKind.TypeParameter)
Microsoft.CodeAnalysis.VisualBasic (43)
Analysis\FlowAnalysis\DataFlowPass.vb (1)
1273ElseIf type.TypeKind = TypeKind.TypeParameter Then
Binding\Binder_Expressions.vb (3)
2715If CaseInsensitiveComparison.Equals(leftType.Name, leftName) AndAlso leftType.TypeKind <> TYPEKIND.TypeParameter Then 2877If type.TypeKind = TYPEKIND.TypeParameter Then 3781Case 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)
299Case 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)
294(receiverType.IsReferenceType AndAlso receiverType.TypeKind = TypeKind.TypeParameter) 493Debug.Assert(thisType.TypeKind <> TypeKind.TypeParameter) 615If elementType.TypeKind = TypeKind.TypeParameter Then 1590If ((type IsNot Nothing) AndAlso (type.TypeKind = TypeKind.TypeParameter) AndAlso constantValue.IsNull) Then 1710Return 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)
190If propertyType.TypeKind = TypeKind.TypeParameter Then
Semantics\AccessCheck.vb (2)
446Case TypeKind.TypeParameter 511Case TypeKind.TypeParameter
Symbols\ConstraintsHelper.vb (5)
222Case TypeKind.TypeParameter 811Debug.Assert(baseType.TypeKind <> TypeKind.TypeParameter) 836Case TypeKind.TypeParameter 910Case TypeKind.TypeParameter 1081If 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)
SemanticModelExtensions.vb (1)
256If parameter.Type.TypeKind <> TypeKind.TypeParameter Then
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler (1)
SymbolExtensions.vb (1)
27If type.TypeKind = TypeKind.TypeParameter Then
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler.UnitTests (1)
ExpressionCompilerTests.vb (1)
2078Assert.Equal(returnType.TypeKind, TypeKind.TypeParameter)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
181If delegateSymbol.Arity <> 0 AndAlso delegateSymbol.TypeArguments.Any(Function(n) n.TypeKind = TypeKind.TypeParameter) Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (5)
Semantics\GetExtendedSemanticInfoTests.vb (3)
9512Assert.Equal(TypeKind.TypeParameter, semanticSummary.Type.TypeKind) 10088Assert.Equal(TypeKind.TypeParameter, semanticSummary.Type.TypeKind) 10090Assert.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)
73Assert.Equal(TypeKind.TypeParameter, C1_T.TypeKind)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
SemanticModelExtensions.vb (1)
256If parameter.Type.TypeKind <> TypeKind.TypeParameter Then
Microsoft.CodeAnalysis.Workspaces (5)
Classification\ClassificationExtensions.cs (1)
18TypeKind.TypeParameter => ClassificationTypeNames.TypeParameterName,
CodeGenerationTypeParameterSymbol.cs (1)
70public override TypeKind TypeKind => TypeKind.TypeParameter;
EditorConfigNamingStyleParser_SymbolSpec.cs (1)
406case TypeKind.TypeParameter:
Recommendations\AbstractRecommendationServiceRunner.cs (1)
402if (originalConstraintType.TypeKind == TypeKind.TypeParameter)
SymbolSpecification.cs (1)
88new SymbolKindOrTypeKind(TypeKind.TypeParameter),
Microsoft.VisualStudio.LanguageServices (4)
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (1)
93typeSymbol.TypeKind == TypeKind.TypeParameter ||
Library\VsNavInfo\NavInfoFactory.cs (1)
101TypeKind.TypeParameter)
Progression\GraphNodeIdCreation.cs (2)
79if (symbol.TypeKind == TypeKind.TypeParameter) 245else if (underlyingType.TypeKind != TypeKind.TypeParameter)
Microsoft.VisualStudio.LanguageServices.Implementation (1)
CodeModel\AbstractCodeModelService.cs (1)
260TypeKind.TypeParameter or
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
CodeModel\VisualBasicCodeModelService.vb (1)
809If typeSymbol.TypeKind = TypeKind.TypeParameter Then