11 overrides of HasValueTypeConstraint
Microsoft.CodeAnalysis.CSharp (9)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeParameterSymbol.cs (1)
89public override bool HasValueTypeConstraint
Symbols\ErrorTypeSymbol.ErrorTypeParameterSymbol.cs (1)
86public override bool HasValueTypeConstraint
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
562public override bool HasValueTypeConstraint
Symbols\Source\CrefTypeParameterSymbol.cs (1)
125public override bool HasValueTypeConstraint
Symbols\Source\IndexedTypeParameterSymbol.cs (1)
140public override bool HasValueTypeConstraint
Symbols\Source\SourceTypeParameterSymbol.cs (3)
493public override bool HasValueTypeConstraint 626public override bool HasValueTypeConstraint 880public override bool HasValueTypeConstraint
Symbols\Wrapped\WrappedTypeParameterSymbol.cs (1)
112public override bool HasValueTypeConstraint
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (2)
Symbols\EETypeParameterSymbol.cs (1)
93public override bool HasValueTypeConstraint
Symbols\SimpleTypeParameterSymbol.cs (1)
75public override bool HasValueTypeConstraint
102 references to HasValueTypeConstraint
Microsoft.CodeAnalysis.CSharp (21)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
933Debug.Assert(type.HasValueTypeConstraint == other.HasValueTypeConstraint);
Emitter\Model\TypeParameterSymbolAdapter.cs (3)
275if (AdaptedTypeParameterSymbol.HasValueTypeConstraint && !seenValueType) 298return AdaptedTypeParameterSymbol.HasValueTypeConstraint || AdaptedTypeParameterSymbol.HasUnmanagedTypeConstraint; 309return AdaptedTypeParameterSymbol.HasConstructorConstraint || AdaptedTypeParameterSymbol.HasValueTypeConstraint || AdaptedTypeParameterSymbol.HasUnmanagedTypeConstraint;
Emitter\NoPia\EmbeddedTypeParameter.cs (1)
44return UnderlyingTypeParameter.AdaptedTypeParameterSymbol.HasValueTypeConstraint;
Symbols\ConstraintsHelper.cs (5)
114NamedTypeSymbol effectiveBaseClass = corLibrary.GetSpecialType(typeParameter.HasValueTypeConstraint ? SpecialType.System_ValueType : SpecialType.System_Object); 174else if (constraintTypeParameter.HasValueTypeConstraint) 448else if (deducedBase.IsNullableType() && (typeParameter.HasValueTypeConstraint || typeParameter.HasReferenceTypeConstraint)) 937if (typeParameter.HasValueTypeConstraint && !typeArgument.Type.IsNonNullableValueType()) 1333return typeParameter.HasValueTypeConstraint || TypeParameterSymbol.CalculateIsValueTypeFromConstraintTypes(constraintTypes);
Symbols\MemberSignatureComparer.cs (3)
617(typeParameter1.HasValueTypeConstraint != typeParameter2.HasValueTypeConstraint) || 693typeParameter2.HasValueTypeConstraint)
Symbols\PublicModel\TypeParameterSymbol.cs (1)
89bool ITypeParameterSymbol.HasValueTypeConstraint => _underlying.HasValueTypeConstraint;
Symbols\Source\SourceTypeParameterSymbol.cs (3)
335!this.HasValueTypeConstraint && 414else if (!this.HasValueTypeConstraint && this.ConstraintTypesNoUseSiteDiagnostics.IsEmpty && this.IsNotNullable == false) 885return ((object)typeParameter != null) && typeParameter.HasValueTypeConstraint;
Symbols\TypeParameterSymbol.cs (2)
533if (this.HasNotNullConstraint || this.HasValueTypeConstraint) 580if (this.HasValueTypeConstraint)
Symbols\Wrapped\WrappedTypeParameterSymbol.cs (1)
116return _underlyingTypeParameter.HasValueTypeConstraint;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (5)
Emit\NoPiaEmbedTypes.cs (5)
1745Assert.False(t1.HasValueTypeConstraint); 1752Assert.False(t2.HasValueTypeConstraint); 1760Assert.False(t5.HasValueTypeConstraint); 1767Assert.True(t6.HasValueTypeConstraint); 1774Assert.False(t7.HasValueTypeConstraint);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (44)
Attributes\AttributeTests_IsUnmanaged.cs (19)
41Assert.True(typeParameter.HasValueTypeConstraint); 65Assert.True(typeParameter.HasValueTypeConstraint); 95Assert.True(typeParameter.HasValueTypeConstraint); 117Assert.True(typeParameter.HasValueTypeConstraint); 144Assert.True(typeParameter.HasValueTypeConstraint); 170Assert.True(typeParameter.HasValueTypeConstraint); 206Assert.True(typeParameter.HasValueTypeConstraint); 234Assert.True(typeParameter.HasValueTypeConstraint); 261Assert.True(typeParameter.HasValueTypeConstraint); 287Assert.True(typeParameter.HasValueTypeConstraint); 324Assert.True(typeParameter.HasValueTypeConstraint); 353Assert.True(typeParameter.HasValueTypeConstraint); 374Assert.True(typeParameter.HasValueTypeConstraint); 393Assert.True(typeParameter.HasValueTypeConstraint); 421Assert.True(typeParameter.HasValueTypeConstraint); 441Assert.True(typeParameter.HasValueTypeConstraint); 650Assert.True(typeParameter.HasValueTypeConstraint); 733Assert.True(typeParameter.HasValueTypeConstraint); 747Assert.True(typeParameter.HasValueTypeConstraint);
Emit\UnmanagedTypeModifierTests.cs (25)
576Assert.True(parentTypeParameter.HasValueTypeConstraint); 582Assert.True(childTypeParameter.HasValueTypeConstraint); 611Assert.True(typeParameter.HasValueTypeConstraint); 624Assert.True(typeParameter.HasValueTypeConstraint); 657Assert.True(parentTypeParameter.HasValueTypeConstraint); 663Assert.True(childTypeParameter.HasValueTypeConstraint); 689Assert.True(typeParameter.HasValueTypeConstraint); 702Assert.True(typeParameter.HasValueTypeConstraint); 732Assert.True(parentTypeParameter.HasValueTypeConstraint); 738Assert.True(childTypeParameter.HasValueTypeConstraint); 764Assert.True(typeParameter.HasValueTypeConstraint); 777Assert.True(typeParameter.HasValueTypeConstraint); 807Assert.True(parentTypeParameter.HasValueTypeConstraint); 813Assert.True(childTypeParameter.HasValueTypeConstraint); 839Assert.True(typeParameter.HasValueTypeConstraint); 852Assert.True(typeParameter.HasValueTypeConstraint); 882Assert.True(parentTypeParameter.HasValueTypeConstraint); 888Assert.True(childTypeParameter.HasValueTypeConstraint); 915Assert.True(typeParameter.HasValueTypeConstraint); 928Assert.True(typeParameter.HasValueTypeConstraint); 974Assert.True(delegateTypeParameter.HasValueTypeConstraint); 980Assert.True(lambdaTypeParameter.HasValueTypeConstraint); 1001Assert.True(typeParameter.HasValueTypeConstraint); 1027Assert.True(typeParameter.HasValueTypeConstraint); 1384Assert.True(typeParameter.HasValueTypeConstraint);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
Symbols\EETypeParameterSymbol.cs (1)
95get { return _sourceTypeParameter.HasValueTypeConstraint; }
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (19)
Semantics\GenericConstraintsTests.cs (19)
454Assert.False(typeParameter.HasValueTypeConstraint); 472Assert.True(typeParameter.HasValueTypeConstraint); 491Assert.False(typeParameter.HasValueTypeConstraint); 510Assert.False(typeParameter.HasValueTypeConstraint); 978Assert.False(typeParameter.HasValueTypeConstraint); 998Assert.True(typeParameter.HasValueTypeConstraint); 1012Assert.False(typeParameter.HasValueTypeConstraint); 1029Assert.False(typeParameter.HasValueTypeConstraint); 1463Assert.False(typeParameter.HasValueTypeConstraint); 1483Assert.True(typeParameter.HasValueTypeConstraint); 1497Assert.False(typeParameter.HasValueTypeConstraint); 1514Assert.False(typeParameter.HasValueTypeConstraint); 1837Assert.False(typeParameter.HasValueTypeConstraint); 1855Assert.True(typeParameter.HasValueTypeConstraint); 2123Assert.True(typeParameter.HasValueTypeConstraint); 2148Assert.True(typeParameter.HasValueTypeConstraint); 2169Assert.True(typeParameter.HasValueTypeConstraint); 2199Assert.True(typeParameter.HasValueTypeConstraint); 2942Assert.True(typeParameter.HasValueTypeConstraint);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Symbols\CompilationCreationTests.cs (1)
2476Assert.False(foo3TypeParam.HasValueTypeConstraint);
Symbols\Metadata\PE\LoadingGenericTypeParameters.cs (8)
61Assert.False(varC1_T.HasValueTypeConstraint); 128Assert.False(varT.HasValueTypeConstraint); 135Assert.False(varT.HasValueTypeConstraint); 142Assert.False(varT.HasValueTypeConstraint); 150Assert.False(varT.HasValueTypeConstraint); 158Assert.True(varT.HasValueTypeConstraint); 166Assert.False(varT.HasValueTypeConstraint); 173Assert.False(varT.HasValueTypeConstraint);
Symbols\Retargeting\RetargetingTests.cs (2)
1274Assert.Equal(a.HasValueTypeConstraint, b.HasValueTypeConstraint);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
198if (typeParameter.HasValueTypeConstraint)