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