34 references to IsRefLikeOrAllowsRefLikeType
Microsoft.CodeAnalysis.CSharp (34)
Binder\Binder.ValueChecks.cs (9)
54
returnType.
IsRefLikeOrAllowsRefLikeType
();
116
Debug.Assert(parameter.RefKind.IsWritableReference() && parameter.Type.
IsRefLikeOrAllowsRefLikeType
());
2038
if (methodInfo.Method?.RequiresInstanceReceiver == true && receiver?.Type?.
IsRefLikeOrAllowsRefLikeType
() == true)
2195
if (receiver?.Type?.
IsRefLikeOrAllowsRefLikeType
() == true)
2361
parameter.Type.
IsRefLikeOrAllowsRefLikeType
() &&
2511
return method.ReturnType.
IsRefLikeOrAllowsRefLikeType
();
2513
return property.Type.
IsRefLikeOrAllowsRefLikeType
();
4039
if (expr.Type?.
IsRefLikeOrAllowsRefLikeType
() != true)
4736
if (expr.Type?.
IsRefLikeOrAllowsRefLikeType
() != true)
Binder\Binder_Expressions.cs (2)
2109
Debug.Assert(parameter.Type.
IsRefLikeOrAllowsRefLikeType
());
2132
Debug.Assert(parameter.Type.
IsRefLikeOrAllowsRefLikeType
());
Binder\Binder_Statements.cs (2)
1575
Debug.Assert(leftEscape.Equals(rightEscape) || op1.Type.
IsRefLikeOrAllowsRefLikeType
());
1595
if (!hasErrors && op1.Type.
IsRefLikeOrAllowsRefLikeType
())
Binder\ForEachLoopBinder.cs (1)
1069
if (unwrappedCollectionExprType.
IsRefLikeOrAllowsRefLikeType
())
Binder\RefSafetyAnalysis.cs (3)
495
if (node.DeclaredTypeOpt?.Type.
IsRefLikeOrAllowsRefLikeType
() == true)
575
return typeExpression.Type.
IsRefLikeOrAllowsRefLikeType
() ? valEscape : SafeContext.CallingMethod;
638
return member.Type.
IsRefLikeOrAllowsRefLikeType
() ? valEscape : SafeContext.CallingMethod;
Lowering\SpillSequenceSpiller.cs (1)
337
if (refKind != RefKind.None || expression.Type?.
IsRefLikeOrAllowsRefLikeType
() == true)
Symbols\ConstraintsHelper.cs (1)
942
if (typeArgument.Type.
IsRefLikeOrAllowsRefLikeType
())
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
637
(IsFixedSizeBuffer || Type.
IsRefLikeOrAllowsRefLikeType
()))
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
336
else if (typeWithAnnotations.Type.
IsRefLikeOrAllowsRefLikeType
())
Symbols\Source\SourceComplexParameterSymbol.cs (1)
887
return RefKind != RefKind.None || (HasParamsModifier && Type.
IsRefLikeOrAllowsRefLikeType
());
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (3)
1390
if (method.ReturnType.
IsRefLikeOrAllowsRefLikeType
() ||
1395
else if (parameters.Any(p => (p.RefKind is RefKind.Ref or RefKind.Out) && p.Type.
IsRefLikeOrAllowsRefLikeType
()))
1411
else if (parameters.Any(p => p.RefKind == RefKind.None && p.Type.
IsRefLikeOrAllowsRefLikeType
()))
Symbols\Source\SourceMemberFieldSymbol.cs (2)
66
else if (type.
IsRefLikeOrAllowsRefLikeType
() && (this.IsStatic || !containingType.IsRefLikeType))
500
if (type.Type.
IsRefLikeOrAllowsRefLikeType
())
Symbols\Source\SourceParameterSymbol.cs (1)
245
else if (HasParamsModifier && Type.
IsRefLikeOrAllowsRefLikeType
())
Symbols\Source\SourcePropertySymbolBase.cs (1)
1842
else if (this.IsAutoPropertyOrUsesFieldKeyword && type.
IsRefLikeOrAllowsRefLikeType
() && (this.IsStatic || !this.ContainingType.IsRefLikeType))
Symbols\TypeSymbolExtensions.cs (2)
541
return type.IsErrorType() || type.
IsRefLikeOrAllowsRefLikeType
();
1444
return ignoreSpanLikeTypes ? false : type.
IsRefLikeOrAllowsRefLikeType
();
Symbols\TypeWithAnnotations.cs (3)
903
internal override bool IsRefLikeOrAllowsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.
IsRefLikeOrAllowsRefLikeType
();
976
internal override bool IsRefLikeOrAllowsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.
IsRefLikeOrAllowsRefLikeType
();
1077
internal override bool IsRefLikeOrAllowsRefLikeType(TypeSymbol typeSymbol) => typeSymbol.
IsRefLikeOrAllowsRefLikeType
();