17 overrides of TypeParameters
Microsoft.CodeAnalysis.VisualBasic (15)
Lowering\StateMachineRewriter\SynthesizedContainer.vb (1)
118Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\AnonymousTypes\PublicSymbols\AnonymousTypeOrDelegatePublicSymbol.vb (1)
71Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousTypeOrDelegateTemplateSymbol.vb (1)
128Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\ErrorTypeSymbol.vb (1)
198Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
840Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\Retargeting\RetargetingNamedTypeSymbol.vb (1)
87Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\Source\ImplicitNamedTypeSymbol.vb (1)
65Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\Source\SourceNamedTypeSymbol.vb (1)
769Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (1)
968Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\SubstitutedNamedType.vb (3)
706Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol) 871Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol) 967Public NotOverridable Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\SynthesizedSymbols\SynthesizedEventDelegateSymbol.vb (1)
367Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\Tuples\TupleTypeSymbol.vb (1)
200Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Symbols\UnboundGenericType.vb (1)
109Public MustOverride Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler (1)
Symbols\EENamedTypeSymbol.vb (1)
125Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
MockSymbols.vb (1)
271Public Overrides ReadOnly Property TypeParameters As ImmutableArray(Of TypeParameterSymbol)
341 references to TypeParameters
Microsoft.CodeAnalysis.VisualBasic (51)
Binding\Binder_Conversions.vb (1)
812Dim typeParameters As ImmutableArray(Of TypeParameterSymbol) = source.TypeParameters
Binding\Binder_Symbols.vb (2)
127newTypeArguments(i) = genericType.TypeParameters(i).OriginalDefinition 1006StaticCast(Of TypeSymbol).From(namedType.OriginalDefinition.TypeParameters)))
Binding\DocumentationCommentTypeParamBinder.vb (1)
42Return DirectCast(Me.CommentedSymbol, NamedTypeSymbol).TypeParameters
Binding\NamedTypeBinder.vb (2)
118For Each tp In _typeSymbol.TypeParameters 141For Each tp In _typeSymbol.TypeParameters
Compilation\ClsComplianceChecker.vb (1)
184CheckTypeParameterCompliance(symbol.TypeParameters, symbol)
Compilation\SyntaxTreeSemanticModel.vb (1)
1127Return Me.GetTypeParameterSymbol(typeSymbol.TypeParameters, typeParameter)
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (2)
176Dim n = type.TypeParameters.Length 212Debug.Assert(method.Parameters.Length + If(method.IsSub, 0, 1) = type.TypeParameters.Length)
Emit\EditAndContinue\VisualBasicSymbolMatcher.vb (1)
487otherTypeParameters = DirectCast(otherContainer, NamedTypeSymbol).TypeParameters
Emit\NamedTypeSymbolAdapter.vb (1)
372Return AdaptedNamedTypeSymbol.TypeParameters.Select(Function(t) t.GetCciAdapter())
Lowering\LambdaRewriter\LambdaRewriter.vb (1)
1099_currentTypeParameters = translatedLambdaContainer.TypeParameters
Semantics\Conversions.vb (1)
2759Dim typeParameters As ImmutableArray(Of TypeParameterSymbol) = source.TypeParameters
Semantics\TypeInference\TypeArgumentInference.vb (2)
1490Select Case parameterTypeAsNamedType.TypeParameters(typeArgumentIndex).Variance 1501Debug.Assert(VarianceKind.None = parameterTypeAsNamedType.TypeParameters(typeArgumentIndex).Variance)
Symbols\ConstraintsHelper.vb (1)
579Return CheckConstraints(type, substitution, type.OriginalDefinition.TypeParameters, type.TypeArgumentsNoUseSiteDiagnostics, diagnosticsBuilder, useSiteDiagnosticsBuilder, template)
Symbols\InstanceTypeSymbol.vb (3)
26Return StaticCast(Of TypeSymbol).From(Me.TypeParameters) 55Dim substitution = VisualBasic.Symbols.TypeSubstitution.Create(Me, Me.TypeParameters, typeArguments, allowAlphaRenamedTypeParametersAsArguments:=True) 231GetUnificationUseSiteDiagnosticRecursive(Me.TypeParameters, owner, checkedTypes))
Symbols\Metadata\PE\MemberRefMetadataDecoder.vb (1)
88typeArgument = namedType.TypeParameters(position - arityOffset)
Symbols\Metadata\PE\TupleTypeDecoder.vb (2)
202Return If(decodedType.TypeParameters.IsEmpty, 231subst = TypeSubstitution.Create(definition, definition.TypeParameters, newTypeArgs, False)
Symbols\NamedTypeSymbol.vb (1)
1160Return StaticCast(Of ITypeParameterSymbol).From(Me.TypeParameters)
Symbols\NamedTypeSymbolExtensions.vb (1)
86If current.TypeParameters.HaveVariance() Then
Symbols\Retargeting\RetargetingNamedTypeSymbol.vb (1)
94RetargetingTranslator.Retarget(_underlyingType.TypeParameters), Nothing)
Symbols\Retargeting\RetargetingSymbolTranslator.vb (2)
483newParameters.AddRange(genericType.TypeParameters) 1019Return retargetedContainingType.TypeParameters(typeParameter.Ordinal)
Symbols\Source\SourceMemberContainerTypeSymbol.vb (9)
313Dim typeParams = TypeParameters 384If container.TypeParameters.HaveVariance() Then 607Return ConstructedType.TypeParameters(_typeParameterIndex) 844If container.TypeParameters.HaveVariance() Then 855If container.TypeParameters.HaveVariance() Then 909Debug.Assert(namedType.TypeParameters(0).Variance = VarianceKind.None, "unexpected: a nullable type should have one generic parameter with no variance") 931Select Case namedType.TypeParameters(argumentIndex).Variance 940argumentRequiredVariance = namedType.TypeParameters(argumentIndex).Variance 2935TypeParameters.MatchesAnyName(sym.Name) Then
Symbols\SubstitutedNamedType.vb (3)
670Dim typeParametersDefinitions As ImmutableArray(Of TypeParameterSymbol) = fullInstanceType.TypeParameters 969Return ConstructedFrom.TypeParameters 981Return _substitution.GetTypeArgumentsCustomModifiersFor(OriginalDefinition.TypeParameters(ordinal))
Symbols\SynthesizedSymbols\SynthesizedEventDelegateSymbol.vb (1)
402If container.TypeParameters.HaveVariance() Then
Symbols\Tuples\TupleTypeSymbol.vb (1)
473Dim subst = TypeSubstitution.Create(definition, definition.TypeParameters, typeArgumentsBuilder.ToImmutable(), False)
Symbols\TypeSubstitution.vb (3)
180result(i) = originalDefinition.TypeParameters(i) 599typeParametersDefinitions = DirectCast(memberDefinition, NamedTypeSymbol).TypeParameters 817typeParametersDefinitions = DirectCast(targetGenericDefinition, NamedTypeSymbol).TypeParameters
Symbols\TypeSymbolExtensions.vb (2)
1163Return type.TypeParameters 1182builder.AddRange(type.TypeParameters)
Symbols\UnboundGenericType.vb (3)
427Return Me.ConstructedFrom.TypeParameters 471result = VisualBasic.Symbols.TypeSubstitution.Create(OriginalDefinition, OriginalDefinition.TypeParameters, Me.TypeArgumentsNoUseSiteDiagnostics) 555Dim typeParametersDefinitions As ImmutableArray(Of TypeParameterSymbol) = originalDefinition.TypeParameters
Utilities\VarianceAmbiguity.vb (1)
70nestingType1.TypeParameters(iTypeParameter).Variance,
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (9)
Attributes\AttributeTests_Tuples.vb (2)
364Assert.Equal(1, field6Type.TypeParameters.Length) 758Dim typeParam = t.TypeParameters.Single()
CodeGen\CodeGenTuples.vb (6)
15084Assert.True(m1Tuple.TypeParameters.IsEmpty) 16308Assert.True(m1Tuple.TypeParameters.IsEmpty) 20495Assert.Equal(1, c.TypeParameters.Length) 20496Dim param = c.TypeParameters(0) 20510Assert.Equal(1, c2.TypeParameters.Length) 20511param = c2.TypeParameters(0)
Emit\EmitMetadata.vb (1)
163For Each param In t.TypeParameters
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler (2)
CompilationContext.vb (2)
1366Dim desiredTypeParameters = candidateSubstitutedSourceType.OriginalDefinition.TypeParameters 1425Dim sourceTypeTypeParameters As ImmutableArray(Of TypeParameterSymbol) = candidateMethodDefinition.ContainingType.TypeParameters
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler.UnitTests (4)
ExpressionCompilerTestBase.vb (1)
360AssertEx.All(type.TypeParameters, Function(typeParameter) type.IsContainingSymbolOfAllTypeParameters(typeParameter))
LocalsTests.vb (3)
1134Dim containingTypeTypeParameters = containingType.TypeParameters 1285Assert.Equal(containingType.TypeParameters(1), method.ReturnType) 2014Assert.Equal("T", typeVariablesType.TypeParameters.Single().Name)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (3)
DeclaringSyntaxNodeTests.vb (3)
425For Each s In c1.TypeParameters 430For Each tp In (DirectCast(f.Type, NamedTypeSymbol)).TypeParameters 442For Each tp In (DirectCast(f.Type, NamedTypeSymbol)).TypeParameters
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (272)
DocumentationComments\DocCommentTests.vb (1)
11652Assert.Equal([class].TypeParameters.Single(), info0.CandidateSymbols.Single())
SymbolsTests\AnonymousTypes\AnonymousTypesEmittedSymbolsTests.vb (7)
75Assert.Equal(3, type.TypeParameters.Length) 347CheckPropertyAccessorsAndField(m, type, "aab", type.TypeParameters(0), False) 351CheckPropertyAccessorsAndField(m, type, "AAB", type.TypeParameters(0), True) 382Assert.Equal(type.TypeParameters(0), constr.Parameters(0).Type) 385Assert.Equal(type.TypeParameters(1), constr.Parameters(1).Type) 388Assert.Equal(type.TypeParameters(2), constr.Parameters(2).Type) 610Assert.Equal(3, type.TypeParameters.Length)
SymbolsTests\CompilationCreationTests.vb (9)
1804Dim params1 = retval1.ContainingType.TypeParameters.Concat(retval1.TypeParameters) 1805Assert.Same(params1(0), type1.TypeParameters(0)) 1806Assert.Same(params1(1).OriginalDefinition, type2.TypeParameters(0).OriginalDefinition) 1820Dim params3 = retval3.TypeParameters 1821Assert.Same(params3(0), type6.TypeParameters(0)) 1913Assert.Equal(0, type3.TypeParameters.Length) 1914Dim localC6Params = typeC6.TypeParameters 1937Assert.Same((DirectCast(localC6_T, RetargetingTypeParameterSymbol)).UnderlyingTypeParameter, asm3.GlobalNamespace.GetTypeMembers("C6").Single().TypeParameters(0))
SymbolsTests\GenericConstraintTests.vb (14)
3619CheckConstraints(type.TypeParameters(0), TypeParameterConstraintKind.None) 3620CheckConstraints(type.TypeParameters(1), TypeParameterConstraintKind.None, "T") 3621CheckConstraints(type.TypeParameters(2), TypeParameterConstraintKind.None, "A", "B") 3741CheckConstraints([namespace].GetMember(Of NamedTypeSymbol)("O1").TypeParameters(0), TypeParameterConstraintKind.None) 3742CheckConstraints([namespace].GetMember(Of NamedTypeSymbol)("O2").TypeParameters(0), TypeParameterConstraintKind.None, "Object") 3743CheckConstraints([namespace].GetMember(Of NamedTypeSymbol)("V1").TypeParameters(0), TypeParameterConstraintKind.ValueType) 3744CheckConstraints([namespace].GetMember(Of NamedTypeSymbol)("V2").TypeParameters(0), TypeParameterConstraintKind.ValueType) 3745CheckConstraints([namespace].GetMember(Of NamedTypeSymbol)("V3").TypeParameters(0), TypeParameterConstraintKind.ValueType) 3746CheckConstraints([namespace].GetMember(Of NamedTypeSymbol)("V4").TypeParameters(0), TypeParameterConstraintKind.ValueType) 3747CheckConstraints([namespace].GetMember(Of NamedTypeSymbol)("V5").TypeParameters(0), TypeParameterConstraintKind.None, "ValueType") 3748CheckConstraints([namespace].GetMember(Of NamedTypeSymbol)("R1").TypeParameters(0), TypeParameterConstraintKind.None, "A") 3749CheckConstraints([namespace].GetMember(Of NamedTypeSymbol)("R2").TypeParameters(0), TypeParameterConstraintKind.ReferenceType, "A") 4393CheckConstraints(type.TypeParameters(0), TypeParameterConstraintKind.None) 4395CheckConstraints(type.TypeParameters(0), TypeParameterConstraintKind.None, "C")
SymbolsTests\InstantiatingGenerics.vb (100)
38typeParameters = type.TypeParameters 41constructedFromTypeParameters = type.ConstructedFrom.TypeParameters 43originalDefinitionTypeParameters = type.OriginalDefinition.TypeParameters 172Assert.Same(type, type.Construct(type.TypeParameters.As(Of TypeSymbol)())) 225Dim C1_T = C1.TypeParameters(0) 230Dim C2_T = C2.TypeParameters(0) 239Dim C4_T = C4.TypeParameters(0) 244Dim TC2_T1 = TC2.TypeParameters(0) 245Dim TC2_T2 = TC2.TypeParameters(1) 251Dim C108_T = C108.TypeParameters(0) 262Assert.NotEqual(C2.TypeParameters(0), g1_C2.TypeParameters(0)) 263Assert.Same(C2.TypeParameters(0), g1_C2.TypeParameters(0).OriginalDefinition) 264Assert.Same(g1_C2.TypeParameters(0), g1_C2.TypeArguments(0)) 484Assert.Same(c3.TypeParameters(0), c3OfIntInt.TypeParameters(0)) 489substitution = TypeSubstitution.Create(c1, {c1.TypeParameters(0), c1.TypeParameters(1)}, {int, int}) 498Assert.Same(c1.TypeParameters(0), c1OfIntInt.TypeParameters(0)) 500Assert.NotSame(c2.TypeParameters(0), c1OfIntInt_c2.TypeParameters(0)) 501Assert.Same(c1OfIntInt_c2.TypeParameters(0), c1OfIntInt_c2.TypeArguments(0)) 502Assert.Same(c1OfIntInt_c2, c1OfIntInt_c2.TypeParameters(0).ContainingSymbol) 503Assert.NotSame(c3.TypeParameters(0), c1OfIntInt_c2_c3.TypeParameters(0)) 504Assert.Same(c1OfIntInt_c2_c3.TypeParameters(0), c1OfIntInt_c2_c3.TypeArguments(0)) 505Assert.Same(c1OfIntInt_c2_c3, c1OfIntInt_c2_c3.TypeParameters(0).ContainingSymbol) 521substitution = TypeSubstitution.Create(c3, {c1.TypeParameters(0), c1.TypeParameters(1)}, {int, int}) 537Assert.Same(c1.TypeParameters(0), c1OfIntInt.TypeParameters(0)) 539Assert.NotSame(c2.TypeParameters(0), c1OfIntInt_c2Of.TypeParameters(0)) 540Assert.NotSame(c1OfIntInt_c2Of.TypeParameters(0), c1OfIntInt_c2Of.TypeArguments(0)) 541Assert.Same(c1OfIntInt_c2Of.TypeParameters(0).OriginalDefinition, c1OfIntInt_c2Of.TypeArguments(0)) 542Assert.NotSame(c1OfIntInt_c2Of, c1OfIntInt_c2Of.TypeParameters(0).ContainingSymbol) 543Assert.Same(c1OfIntInt_c2Of.ConstructedFrom, c1OfIntInt_c2Of.TypeParameters(0).ContainingSymbol) 544Assert.NotSame(c3.TypeParameters(0), c1OfIntInt_c2Of_c3Of.TypeParameters(0)) 545Assert.NotSame(c1OfIntInt_c2Of_c3Of.TypeParameters(0), c1OfIntInt_c2Of_c3Of.TypeArguments(0)) 546Assert.Same(c1OfIntInt_c2Of_c3Of.TypeParameters(0).OriginalDefinition, c1OfIntInt_c2Of_c3Of.TypeArguments(0)) 547Assert.NotSame(c1OfIntInt_c2Of_c3Of, c1OfIntInt_c2Of_c3Of.TypeParameters(0).ContainingSymbol) 548Assert.Same(c1OfIntInt_c2Of_c3Of.ConstructedFrom, c1OfIntInt_c2Of_c3Of.TypeParameters(0).ContainingSymbol) 565{c1.TypeParameters(0), c1.TypeParameters(1), c2.TypeParameters(0), c2.TypeParameters(1)}, 566{int, int, c2.TypeParameters(0), c2.TypeParameters(1)}) 571Dim c1OfIntInt_c2Of_c3OfInt = c1OfIntInt_c2Of_c3.Construct(int, c3.TypeParameters(1)) 575Assert.False(c1OfIntInt_c2Of_c3OfInt.TypeParameters(1).IsDefinition) 578Assert.NotEqual(c1OfIntInt_c2Of_c3.TypeParameters(1), c1OfIntInt_c2Of_c3OfInt.TypeArguments(1)) 579Assert.Same(c1OfIntInt_c2Of_c3.TypeParameters(1).OriginalDefinition, c1OfIntInt_c2Of_c3OfInt.TypeArguments(1)) 581Assert.Same(c3.TypeParameters(1), c1OfIntInt_c2Of_c3.TypeParameters(1).OriginalDefinition) 582Assert.Same(c3.TypeParameters(1).Name, c1OfIntInt_c2Of_c3.TypeParameters(1).Name) 583Assert.Equal(c3.TypeParameters(1).HasConstructorConstraint, c1OfIntInt_c2Of_c3.TypeParameters(1).HasConstructorConstraint) 584Assert.Equal(c3.TypeParameters(1).HasReferenceTypeConstraint, c1OfIntInt_c2Of_c3.TypeParameters(1).HasReferenceTypeConstraint) 585Assert.Equal(c3.TypeParameters(1).HasValueTypeConstraint, c1OfIntInt_c2Of_c3.TypeParameters(1).HasValueTypeConstraint) 586Assert.Equal(c3.TypeParameters(1).Ordinal, c1OfIntInt_c2Of_c3.TypeParameters(1).Ordinal) 588Assert.Throws(Of InvalidOperationException)(Sub() c1OfIntInt_c2_c3.Construct(c3.TypeParameters(0), c3.TypeParameters(1))) 590Dim c1OfIntInt_c2Of_c3Constructed = c1OfIntInt_c2Of_c3.Construct(c3.TypeParameters(0), c3.TypeParameters(1)) 601Assert.Same(c3, c3.Construct(c3.TypeParameters(0), c3.TypeParameters(1))) 603substitution = TypeSubstitution.Create(c1, {c1.TypeParameters(0), c1.TypeParameters(1)}, {int, int}) 606substitution = TypeSubstitution.Create(c5, {c1.TypeParameters(0), c1.TypeParameters(1)}, {int, int}) 610Assert.Equal(0, c1OfIntInt_C5_1.TypeParameters.Length) 637Assert.Same(c1OfIntInt_c2, c1OfIntInt_c2.Construct(New List(Of TypeSymbol) From {c1OfIntInt_c2.TypeParameters(0), c1OfIntInt_c2.TypeParameters(1)})) 639Assert.Same(c1OfIntInt_c2, c1OfIntInt_c2.Construct(c1OfIntInt_c2_1.TypeParameters(0), c1OfIntInt_c2_1.TypeParameters(1))) 640Dim alphaConstructedC2 = c1OfIntInt_c2.Construct(c1OfIntInt_c2_1.TypeParameters(1), c1OfIntInt_c2_1.TypeParameters(0)) 643Assert.Same(alphaConstructedC2.TypeArguments(0), c1OfIntInt_c2.TypeParameters(1)) 644Assert.NotSame(alphaConstructedC2.TypeArguments(0), c1OfIntInt_c2_1.TypeParameters(1)) 645Assert.Same(alphaConstructedC2.TypeArguments(1), c1OfIntInt_c2.TypeParameters(0)) 646Assert.NotSame(alphaConstructedC2.TypeArguments(1), c1OfIntInt_c2_1.TypeParameters(0)) 648alphaConstructedC2 = c1OfIntInt_c2.Construct(c1OfIntInt_c2_1.TypeParameters(0), c1OfIntInt) 651Assert.Same(alphaConstructedC2.TypeArguments(0), c1OfIntInt_c2.TypeParameters(0)) 652Assert.NotSame(alphaConstructedC2.TypeArguments(0), c1OfIntInt_c2_1.TypeParameters(0)) 655alphaConstructedC2 = c1OfIntInt_c2.Construct(c1OfIntInt, c1OfIntInt_c2_1.TypeParameters(1)) 659Assert.Same(alphaConstructedC2.TypeArguments(1), c1OfIntInt_c2.TypeParameters(1)) 660Assert.NotSame(alphaConstructedC2.TypeArguments(1), c1OfIntInt_c2_1.TypeParameters(1)) 702substitution1 = TypeSubstitution.Create(c1, {c1.TypeParameters(0), c1.TypeParameters(1)}, {int, int}) 705substitution2 = TypeSubstitution.Create(c4, {c3.TypeParameters(0), c4.TypeParameters(0)}, {bte, chr}) 718Assert.Null(TypeSubstitution.Create(c4, {c1.TypeParameters(0)}, {c1.TypeParameters(0)}))
SymbolsTests\Metadata\MetadataTypeTests.vb (4)
140Assert.Equal(0, class1.TypeParameters.Length) 195Assert.Equal(2, type1.TypeParameters.Length) 249Assert.Equal(1, type1.TypeParameters.Length) 301Assert.Equal(0, type1.TypeParameters.Length)
SymbolsTests\Metadata\PE\BaseTypeResolution.vb (1)
74Assert.Same(DirectCast(base, NamedTypeSymbol).TypeArguments(0), orderablePartitioner.TypeParameters(0))
SymbolsTests\Metadata\PE\LoadCustomModifiers.vb (2)
143Dim badTypeParameter = compilation.GetTypeByMetadataName("TestRef`1").TypeParameters.Single() 211Dim badTypeParameter = compilation.GetTypeByMetadataName("D`1").TypeParameters.Single()
SymbolsTests\Metadata\PE\LoadingAttributes.vb (3)
1066Dim tp = igoo.TypeParameters(0) 1075tp = igoo.TypeParameters(1) 1193Dim tp = foo.TypeParameters(0)
SymbolsTests\Metadata\PE\LoadingFields.vb (1)
43Assert.Same(vbFields.TypeParameters(0), f1.Type)
SymbolsTests\Metadata\PE\LoadingGenericTypeParameters.vb (20)
29Assert.Equal(0, objectType.TypeParameters.Length) 38Assert.Equal(1, C1.TypeParameters.Length) 41Dim C1_T = C1.TypeParameters(0) 80Assert.Equal(1, C2.TypeParameters.Length) 83Dim C2_T = C2.TypeParameters(0) 90Assert.Equal(0, C3.TypeParameters.Length) 95Assert.Equal(1, C4.TypeParameters.Length) 98Dim C4_T = C4.TypeParameters(0) 106Assert.Equal(2, TC2.TypeParameters.Length) 109Dim TC2_T1 = TC2.TypeParameters(0) 110Dim TC2_T2 = TC2.TypeParameters(1) 124Dim T = C100.TypeParameters(0) 131T = C101.TypeParameters(0) 138T = C102.TypeParameters(0) 146T = C103.TypeParameters(0) 154T = C104.TypeParameters(0) 162T = C105.TypeParameters(0) 169T = C106.TypeParameters(0) 179T = C201.TypeParameters(0) 184T = C202.TypeParameters(0)
SymbolsTests\Metadata\PE\MissingTypeReferences.vb (20)
280Dim param1 = missing.TypeParameters(0) 281Dim param2 = missing2.TypeParameters(0) 293Assert.Same(missing, missing.Construct(missing.TypeParameters.As(Of TypeSymbol)())) 295Dim wrongSubstitution = TypeSubstitution.Create(TC7, {TC7.TypeParameters(0)}.AsImmutableOrNull(), 298Dim substitution = TypeSubstitution.Create(missing, {TC.TypeParameters(0), TC.TypeParameters(1), missing.TypeParameters(0)}.AsImmutableOrNull(), 299ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(1), TC.TypeParameters(0), TC.TypeParameters(1))) 314substitution = TypeSubstitution.Create(TC, {TC.TypeParameters(0), TC.TypeParameters(1)}.AsImmutableOrNull(), 315ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(1), TC.TypeParameters(0))) 323ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(0))) 331substitution = TypeSubstitution.Create(TC, {TC.TypeParameters(0)}.AsImmutableOrNull(), 338ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(1))) 348ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(0))) 358substitution = TypeSubstitution.Create(TC, {TC.TypeParameters(0)}.AsImmutableOrNull(), 365ImmutableArray.Create(Of TypeSymbol)(TC.TypeParameters(1)))
SymbolsTests\Metadata\PE\VisualBasicCompilerFeatureRequiredTests.vb (1)
227Assert.True(onClassTypeParameter.TypeParameters(0).HasUnsupportedMetadata)
SymbolsTests\Retargeting\RetargetingTests.vb (39)
132CheckTypeParameters(sourceType.TypeParameters(0), retargetingType.TypeParameters(0)) 315Dim i_ct_v2 = compilation1_v2.GetTypeByMetadataName("I`1").Construct(ImmutableArray.Create(Of TypeSymbol)(c.TypeParameters(0))) 631Dim sourceTypeParameter = sourceType.TypeParameters.Single() 637Dim retargetingTypeParameter = retargetingType.TypeParameters.Single() 672Dim sourceTypeParameter = sourceType.TypeParameters.Single() 679Dim retargetingTypeParameter = retargetingType.TypeParameters.Single() 1327Assert.Equal(sourceType.TypeParameters.Length, retargetingType.TypeParameters.Length) 1328For i = 0 To sourceType.TypeParameters.Length - 1 1329CheckTypeParameters(sourceType.TypeParameters(i), retargetingType.TypeParameters(i)) 1337Assert.Equal(sourceType.TypeParameters.Length, retargetingType.TypeParameters.Length) 1338Assert.Equal(1, sourceType.TypeParameters(0).ConstraintTypes.Length) 1339Assert.Equal(sourceType.TypeParameters(0).ConstraintTypes.Length, retargetingType.TypeParameters(0).ConstraintTypes.Length) 1340Assert.False(sourceType.TypeParameters(0).HasConstructorConstraint) 1341Assert.Equal(sourceType.TypeParameters(0).HasConstructorConstraint, retargetingType.TypeParameters(0).HasConstructorConstraint) 1342For i = 0 To sourceType.TypeParameters(0).ConstraintTypes.Length - 1 1343CheckTypes(sourceType.TypeParameters(0).ConstraintTypes(i), retargetingType.TypeParameters(0).ConstraintTypes(i)) 1345Assert.Equal("TestInterface", CType(sourceType.TypeParameters(0).ConstraintTypes(0), SourceNamedTypeSymbol).Name) 1352Assert.Equal(sourceType.TypeParameters.Length, retargetingType.TypeParameters.Length) 1353Assert.Equal(1, sourceType.TypeParameters(0).ConstraintTypes.Length) 1354Assert.Equal(sourceType.TypeParameters(0).ConstraintTypes.Length, retargetingType.TypeParameters(0).ConstraintTypes.Length) 1355Assert.True(sourceType.TypeParameters(0).HasConstructorConstraint) 1356Assert.Equal(sourceType.TypeParameters(0).HasConstructorConstraint, retargetingType.TypeParameters(0).HasConstructorConstraint) 1357For i = 0 To sourceType.TypeParameters.Length - 1 1358CheckTypeParameters(sourceType.TypeParameters(i), retargetingType.TypeParameters(i)) 1359CheckTypes(sourceType.TypeParameters(0).ConstraintTypes(i), retargetingType.TypeParameters(0).ConstraintTypes(i)) 1361Assert.Equal("TestClass", CType(sourceType.TypeParameters(0).ConstraintTypes(0), SourceNamedTypeSymbol).Name) 3104Assert.Equal(CType(sourceType.GetMember("Del_G_Sub_Constraint"), SourceNamedTypeSymbol).TypeParameters(0).ConstraintTypes(0), CType(retargetingType.GetMember("Del_G_Sub_Constraint"), RetargetingNamedTypeSymbol).UnderlyingNamedType.TypeParameters(0).ConstraintTypes(0))
SymbolsTests\Source\DelegateTests.vb (1)
197Dim param1Type = subGenDel.TypeParameters(0)
SymbolsTests\Source\PropertyTests.vb (3)
4611Assert.Equal(type.TypeParameters.Length, 0) 4622Assert.Equal(type.TypeParameters.Length, 2) 4635Assert.Equal(type.TypeParameters.Length, 2)
SymbolsTests\Source\SourceSymbolTests.vb (1)
326Dim tp1 = DirectCast(classD.TypeParameters(0), TypeParameterSymbol)
SymbolsTests\Source\TypeBindingTests.vb (2)
281Assert.Same(classD.TypeParameters(0), fieldJ.Type) 282Assert.Same(classC.TypeParameters(1), fieldK.Type)
SymbolsTests\Source\TypeTests.vb (42)
41Assert.NotSame(b1.TypeParameters(0), b2.TypeParameters(0)) ' they've been alpha renamed independently 42Assert.Equal(b1.TypeParameters(0), b2.TypeParameters(0)) ' but happen to be the same type 117Assert.Equal(0, classB.TypeParameters.Length) 134Assert.Equal(1, delegateB.TypeParameters.Length) 135Assert.Equal(0, delegateB.TypeParameters(0).Ordinal) 136Assert.Same(delegateB, delegateB.TypeParameters(0).ContainingSymbol) 243Assert.Equal(1, outerClass.TypeParameters.Length) 244Dim outerTypeParam = outerClass.TypeParameters(0) 293Assert.Equal(1, i2Arity1.TypeParameters.Length) 294Dim i2Arity1TypeParam = i2Arity1.TypeParameters(0) 307Assert.Equal(2, i2Arity2.TypeParameters.Length) 308Dim i2Arity2TypeParam0 = i2Arity2.TypeParameters(0) 311Dim i2Arity2TypeParam1 = i2Arity2.TypeParameters(1) 608Assert.Equal(1, classA.TypeParameters.Length) 609Assert.Equal("V", classA.TypeParameters(0).Name) 618Assert.Equal(1, igoo.TypeParameters.Length) 619Assert.Equal("T", igoo.TypeParameters(0).Name) 628Assert.Equal(2, structS.TypeParameters.Length) 629Assert.Equal("X", structS.TypeParameters(0).Name) 630Assert.Equal("Y", structS.TypeParameters(1).Name) 652Dim typeParams = interfaceZ.TypeParameters 928Assert.Equal(1, type2.TypeParameters.Length) 3807Dim modifiedU = ImmutableArray.Create(New TypeWithModifiers(iDefinition.TypeParameters.Single(), modifiers)) 3808Dim i1 = iDefinition.Construct(TypeSubstitution.Create(iDefinition, iDefinition.TypeParameters, modifiedU)) 3817Dim modifiedT = ImmutableArray.Create(New TypeWithModifiers(cDefinition.TypeParameters.Single(), modifiers)) 3818Dim c2 = cDefinition.Construct(TypeSubstitution.Create(cDefinition, cDefinition.TypeParameters, modifiedT)) 3825Dim i2a = i2.Construct(iDefinition.TypeParameters.Single()) 3831ImmutableArray.Create(cDefinition.TypeParameters.Single(), iDefinition.TypeParameters.Single()), 3837Dim c4 = cDefinition.Construct(TypeSubstitution.Create(cDefinition, cDefinition.TypeParameters, modifiedT)) 3872Dim modifiedT = New TypeWithModifiers(cDefinition.TypeParameters.Single(), modifiers) 3873Dim modifiedU = New TypeWithModifiers(c2Definition.TypeParameters.Single(), modifiers) 3874Dim modifiedV = New TypeWithModifiers(iDefinition.TypeParameters.Single(), modifiers) 3877ImmutableArray.Create(cDefinition.TypeParameters.Single(), c2Definition.TypeParameters.Single(), iDefinition.TypeParameters.Single()), 3936Dim modifiedU = ImmutableArray.Create(New TypeWithModifiers(definition.TypeParameters.Single(), modifiers)) 3937Dim t1 = definition.Construct(TypeSubstitution.Create(definition, definition.TypeParameters, modifiedU)) 3951Dim ctp = c.TypeParameters(0) 3952Dim ctp2 = c2.TypeParameters(0)
SymbolsTests\SymbolErrorTests.vb (1)
23196Assert.Equal(0, myMod.TypeParameters.Length)