34 references to IsRefLikeOrAllowsRefLikeType
Microsoft.CodeAnalysis.CSharp (34)
Binder\Binder.ValueChecks.cs (9)
54returnType.IsRefLikeOrAllowsRefLikeType(); 116Debug.Assert(parameter.RefKind.IsWritableReference() && parameter.Type.IsRefLikeOrAllowsRefLikeType()); 2061if (methodInfo.Method?.RequiresInstanceReceiver == true && receiver?.Type?.IsRefLikeOrAllowsRefLikeType() == true) 2218if (receiver?.Type?.IsRefLikeOrAllowsRefLikeType() == true) 2384parameter.Type.IsRefLikeOrAllowsRefLikeType() && 2534return method.ReturnType.IsRefLikeOrAllowsRefLikeType(); 2536return property.Type.IsRefLikeOrAllowsRefLikeType(); 4062if (expr.Type?.IsRefLikeOrAllowsRefLikeType() != true) 4754if (expr.Type?.IsRefLikeOrAllowsRefLikeType() != true)
Binder\Binder_Expressions.cs (2)
2106Debug.Assert(parameter.Type.IsRefLikeOrAllowsRefLikeType()); 2129Debug.Assert(parameter.Type.IsRefLikeOrAllowsRefLikeType());
Binder\Binder_Statements.cs (2)
1573Debug.Assert(leftEscape == rightEscape || op1.Type.IsRefLikeOrAllowsRefLikeType()); 1592if (!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 : CallingMethodScope; 613return member.Type.IsRefLikeOrAllowsRefLikeType() ? valEscape : CallingMethodScope;
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();