11 overrides of AllowsRefLikeType
Microsoft.CodeAnalysis.CSharp (11)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeParameterSymbol.cs (1)
96
public override bool
AllowsRefLikeType
=> _allowsRefLikeType;
Symbols\ErrorTypeSymbol.ErrorTypeParameterSymbol.cs (1)
94
public override bool
AllowsRefLikeType
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
571
public override bool
AllowsRefLikeType
Symbols\Source\CrefTypeParameterSymbol.cs (1)
130
public override bool
AllowsRefLikeType
Symbols\Source\IndexedTypeParameterSymbol.cs (1)
145
public override bool
AllowsRefLikeType
Symbols\Source\SourceTypeParameterSymbol.cs (2)
507
public override bool
AllowsRefLikeType
634
public abstract override bool
AllowsRefLikeType
{ get; }
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeParameterSymbol.cs (1)
37
public override bool
AllowsRefLikeType
=> false; // The list is a class type and cannot store ref structs as elements.
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
231
public override bool
AllowsRefLikeType
=> false; // Span types do not support ref like type parameters for now
Symbols\SynthesizedSimpleMethodTypeParameterSymbol.cs (1)
71
public override bool
AllowsRefLikeType
Symbols\Wrapped\WrappedTypeParameterSymbol.cs (1)
120
public override bool
AllowsRefLikeType
36 references to AllowsRefLikeType
Microsoft.CodeAnalysis.CSharp (36)
Binder\Binder_Expressions.cs (1)
8750
if (receiverOpt is { Type: TypeParameterSymbol {
AllowsRefLikeType
: true } } &&
Binder\Binder_Operators.cs (4)
3525
if (targetType is TypeParameterSymbol {
AllowsRefLikeType
: true })
3532
else if (operandType is not TypeParameterSymbol {
AllowsRefLikeType
: true })
3538
Debug.Assert(operandType is TypeParameterSymbol {
AllowsRefLikeType
: false });
3546
Debug.Assert(targetType is TypeParameterSymbol {
AllowsRefLikeType
: false });
Binder\ForEachLoopBinder.cs (2)
1247
if (enumeratorType is TypeParameterSymbol {
AllowsRefLikeType
: true })
1799
needSupportForRefStructInterfaces = typeParameter.
AllowsRefLikeType
;
Binder\Semantics\Conversions\ConversionsBase.cs (11)
2861
if (destination is TypeParameterSymbol {
AllowsRefLikeType
: false } &&
2862
!source.
AllowsRefLikeType
&&
2881
if (source.
AllowsRefLikeType
)
2904
if (destination is TypeParameterSymbol {
AllowsRefLikeType
: false } &&
3023
return typeParameter.
AllowsRefLikeType
&& HasVarianceCompatibleInterfaceInEffectiveInterfaceSet(typeParameter, targetInterfaceType, ref useSiteInfo);
3258
if (source.
AllowsRefLikeType
)
3281
if (destination is TypeParameterSymbol {
AllowsRefLikeType
: false } d &&
3536
if (s?.
AllowsRefLikeType
== true || t?.
AllowsRefLikeType
== true)
3588
if (s?.
AllowsRefLikeType
== true || t?.
AllowsRefLikeType
== true)
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (3)
721
if ((left.Type is TypeParameterSymbol {
AllowsRefLikeType
: true } && right.IsLiteralNull()) ||
722
(right.Type is TypeParameterSymbol {
AllowsRefLikeType
: true } && left.IsLiteralNull()))
779
return (operand.Type is TypeParameterSymbol {
AllowsRefLikeType
: true }) ? Conversion.Boxing : Conversions.ClassifyConversionFromExpression(operand, objectType, isChecked: isChecked, ref useSiteInfo);
CodeGen\EmitOperators.cs (1)
375
if (comparand is BoundConversion { Type.SpecialType: SpecialType.System_Object, ConversionKind: ConversionKind.Boxing, Operand.Type: TypeParameterSymbol {
AllowsRefLikeType
: true } } &&
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
733
Debug.Assert(type.
AllowsRefLikeType
== other.
AllowsRefLikeType
);
Emitter\Model\TypeParameterSymbolAdapter.cs (1)
309
return AdaptedTypeParameterSymbol.
AllowsRefLikeType
;
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
239
_ when variableType is TypeParameterSymbol {
AllowsRefLikeType
: true }
Lowering\SyntheticBoundNodeFactory.cs (1)
1488
arg.Type is TypeParameterSymbol {
AllowsRefLikeType
: true } && type.IsObjectType())
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (1)
180
allowsRefLikeType: typeParametersToSubstitute[i].
AllowsRefLikeType
));
Symbols\ConstraintsHelper.cs (2)
97
if (typeParameter.
AllowsRefLikeType
)
944
if (typeParameter.
AllowsRefLikeType
)
Symbols\MemberSignatureComparer.cs (2)
664
(typeParameter1.
AllowsRefLikeType
!= typeParameter2.
AllowsRefLikeType
) ||
Symbols\PublicModel\TypeParameterSymbol.cs (1)
91
bool ITypeParameterSymbol.AllowsRefLikeType => _underlying.
AllowsRefLikeType
;
Symbols\Source\SourceTypeParameterSymbol.cs (1)
938
return ((object)typeParameter != null) && typeParameter.
AllowsRefLikeType
;
Symbols\TypeSymbolExtensions.cs (1)
546
return type is { IsRefLikeType: true } or TypeParameterSymbol {
AllowsRefLikeType
: true };
Symbols\Wrapped\WrappedTypeParameterSymbol.cs (1)
124
return _underlyingTypeParameter.
AllowsRefLikeType
;