11 overrides of HasConstructorConstraint
Microsoft.CodeAnalysis.CSharp (11)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeParameterSymbol.cs (1)
67public override bool HasConstructorConstraint
Symbols\ErrorTypeSymbol.ErrorTypeParameterSymbol.cs (1)
50public override bool HasConstructorConstraint
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
447public override bool HasConstructorConstraint
Symbols\Source\CrefTypeParameterSymbol.cs (1)
164public override bool HasConstructorConstraint
Symbols\Source\IndexedTypeParameterSymbol.cs (1)
179public override bool HasConstructorConstraint
Symbols\Source\SourceTypeParameterSymbol.cs (2)
490public override bool HasConstructorConstraint 631public abstract override bool HasConstructorConstraint { get; }
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeParameterSymbol.cs (1)
25public override bool HasConstructorConstraint => false;
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
225public override bool HasConstructorConstraint => false;
Symbols\SynthesizedSimpleMethodTypeParameterSymbol.cs (1)
42public override bool HasConstructorConstraint
Symbols\Wrapped\WrappedTypeParameterSymbol.cs (1)
64public override bool HasConstructorConstraint
83 references to HasConstructorConstraint
Microsoft.CodeAnalysis.CSharp (13)
Binder\Binder_Expressions.cs (1)
7091if (!typeParameter.HasConstructorConstraint && !typeParameter.IsValueType)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
738Debug.Assert(type.HasConstructorConstraint == other.HasConstructorConstraint);
Emitter\Model\TypeParameterSymbolAdapter.cs (1)
320return AdaptedTypeParameterSymbol.HasConstructorConstraint || AdaptedTypeParameterSymbol.HasValueTypeConstraint || AdaptedTypeParameterSymbol.HasUnmanagedTypeConstraint;
Emitter\NoPia\EmbeddedTypeParameter.cs (1)
60return UnderlyingTypeParameter.AdaptedTypeParameterSymbol.HasConstructorConstraint;
Symbols\ConstraintsHelper.cs (2)
1112if (typeParameter.HasConstructorConstraint && errorIfNotSatisfiesConstructorConstraint(constructedContainingSymbol, typeParameter, typeArgument, diagnosticsBuilder)) 1503return typeParameter.HasConstructorConstraint || typeParameter.IsValueType ? ConstructorConstraintError.None : ConstructorConstraintError.NoPublicParameterlessConstructorOrAbstractType;
Symbols\MemberSignatureComparer.cs (2)
661if ((typeParameter1.HasConstructorConstraint != typeParameter2.HasConstructorConstraint) ||
Symbols\PublicModel\TypeParameterSymbol.cs (1)
97bool ITypeParameterSymbol.HasConstructorConstraint => _underlying.HasConstructorConstraint;
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (1)
223if (typeParameter.HasConstructorConstraint || typeParameter.HasValueTypeConstraint || typeParameter.HasUnmanagedTypeConstraint)
Symbols\Source\SourceTypeParameterSymbol.cs (1)
921return ((object)typeParameter != null) && typeParameter.HasConstructorConstraint;
Symbols\Wrapped\WrappedTypeParameterSymbol.cs (1)
68return _underlyingTypeParameter.HasConstructorConstraint;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (5)
Emit\NoPiaEmbedTypes.cs (5)
1744Assert.False(t1.HasConstructorConstraint); 1751Assert.False(t2.HasConstructorConstraint); 1759Assert.True(t5.HasConstructorConstraint); 1766Assert.False(t6.HasConstructorConstraint); 1773Assert.False(t7.HasConstructorConstraint);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Emit\UnmanagedTypeModifierTests.cs (3)
1067Assert.False(typeParameter.HasConstructorConstraint); // .ctor is an artifact of emit, we will ignore it on importing. 1093Assert.False(typeParameter.HasConstructorConstraint); // .ctor is an artifact of emit, we will ignore it on importing. 1450Assert.False(typeParameter.HasConstructorConstraint);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
RefStructInterfacesTests.cs (2)
5098Assert.True(t.HasConstructorConstraint); 5122Assert.True(t.HasConstructorConstraint);
Semantics\ParamsCollectionTests.cs (1)
4824Assert.False(delegateType.TypeParameters[0].HasConstructorConstraint);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (46)
Semantics\GenericConstraintsTests.cs (16)
474Assert.False(typeParameter.HasConstructorConstraint); 493Assert.False(typeParameter.HasConstructorConstraint); 512Assert.True(typeParameter.HasConstructorConstraint); 1000Assert.False(typeParameter.HasConstructorConstraint); 1014Assert.False(typeParameter.HasConstructorConstraint); 1031Assert.True(typeParameter.HasConstructorConstraint); 1485Assert.False(typeParameter.HasConstructorConstraint); 1499Assert.False(typeParameter.HasConstructorConstraint); 1516Assert.True(typeParameter.HasConstructorConstraint); 1839Assert.False(typeParameter.HasConstructorConstraint); 1857Assert.False(typeParameter.HasConstructorConstraint); 2125Assert.False(typeParameter.HasConstructorConstraint); 2150Assert.False(typeParameter.HasConstructorConstraint); 2171Assert.False(typeParameter.HasConstructorConstraint); 2201Assert.False(typeParameter.HasConstructorConstraint); 2944Assert.False(typeParameter.HasConstructorConstraint);
Semantics\NullableReferenceTypesTests.cs (30)
103258Assert.True(tf1.HasConstructorConstraint); 103283Assert.True(tf1.HasConstructorConstraint); 103332Assert.True(tf1.HasConstructorConstraint); 103383Assert.True(tf1.HasConstructorConstraint); 103410Assert.True(tf1.HasConstructorConstraint); 103461Assert.True(tf1.HasConstructorConstraint); 103518Assert.True(tf1.HasConstructorConstraint); 103548Assert.True(tf2.HasConstructorConstraint); 103599Assert.True(tf1.HasConstructorConstraint); 103626Assert.True(tf2.HasConstructorConstraint); 103680Assert.True(tf1.HasConstructorConstraint); 103708Assert.True(tf2.HasConstructorConstraint); 103768Assert.True(tf1.HasConstructorConstraint); 103799Assert.True(tf2.HasConstructorConstraint); 103856Assert.True(tf1.HasConstructorConstraint); 103886Assert.True(tf2.HasConstructorConstraint); 103937Assert.True(tf1.HasConstructorConstraint); 103964Assert.True(tf2.HasConstructorConstraint); 104024Assert.True(tf1.HasConstructorConstraint); 104055Assert.True(tf2.HasConstructorConstraint); 104111Assert.True(tf1.HasConstructorConstraint); 104140Assert.True(tf2.HasConstructorConstraint); 137030Assert.True(t.HasConstructorConstraint); 137062Assert.True(t.HasConstructorConstraint); 137158Assert.True(t.HasConstructorConstraint); 137181Assert.True(t.HasConstructorConstraint); 137203Assert.True(t.HasConstructorConstraint); 137225Assert.True(t.HasConstructorConstraint); 137251Assert.True(t.HasConstructorConstraint); 137277Assert.True(t.HasConstructorConstraint);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
Symbols\CompilationCreationTests.cs (2)
2472Assert.False(foo3TypeParam.HasConstructorConstraint); 2474Assert.True(localC6_T.HasConstructorConstraint);
Symbols\Metadata\PE\LoadingGenericTypeParameters.cs (8)
60Assert.False(varC1_T.HasConstructorConstraint); 127Assert.False(varT.HasConstructorConstraint); 134Assert.False(varT.HasConstructorConstraint); 141Assert.True(varT.HasConstructorConstraint); 149Assert.False(varT.HasConstructorConstraint); 157Assert.False(varT.HasConstructorConstraint); 165Assert.True(varT.HasConstructorConstraint); 172Assert.True(varT.HasConstructorConstraint);
Symbols\Retargeting\RetargetingTests.cs (2)
1272Assert.Equal(a.HasConstructorConstraint, b.HasConstructorConstraint);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
190if (typeParameter.HasConstructorConstraint)