12 overrides of AllowsRefLikeType
Microsoft.CodeAnalysis.CSharp (12)
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 (3)
507
public override bool
AllowsRefLikeType
649
public override bool
AllowsRefLikeType
912
public override bool
AllowsRefLikeType
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)
229
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)
8718
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)
1245
if (enumeratorType is TypeParameterSymbol {
AllowsRefLikeType
: true })
1797
needSupportForRefStructInterfaces = typeParameter.
AllowsRefLikeType
;
Binder\Semantics\Conversions\ConversionsBase.cs (11)
2863
if (destination is TypeParameterSymbol {
AllowsRefLikeType
: false } &&
2864
!source.
AllowsRefLikeType
&&
2883
if (source.
AllowsRefLikeType
)
2906
if (destination is TypeParameterSymbol {
AllowsRefLikeType
: false } &&
3025
return typeParameter.
AllowsRefLikeType
&& HasVarianceCompatibleInterfaceInEffectiveInterfaceSet(typeParameter, targetInterfaceType, ref useSiteInfo);
3260
if (source.
AllowsRefLikeType
)
3283
if (destination is TypeParameterSymbol {
AllowsRefLikeType
: false } d &&
3538
if (s?.
AllowsRefLikeType
== true || t?.
AllowsRefLikeType
== true)
3590
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)
1480
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)
917
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
;