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