7 overrides of IsReferenceType
Microsoft.CodeAnalysis.CSharp (7)
Symbols\ArrayTypeSymbol.cs (1)
222public override bool IsReferenceType
Symbols\DynamicTypeSymbol.cs (1)
38public override bool IsReferenceType
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
73public override bool IsReferenceType => false;
Symbols\FunctionTypeSymbol.cs (1)
98public override bool IsReferenceType => true;
Symbols\NamedTypeSymbol.cs (1)
385public override bool IsReferenceType
Symbols\PointerTypeSymbol.cs (1)
93public override bool IsReferenceType
Symbols\TypeParameterSymbol.cs (1)
518public sealed override bool IsReferenceType
106 references to IsReferenceType
Microsoft.CodeAnalysis.CSharp (106)
Binder\Binder.ValueChecks.cs (1)
2296Debug.Assert(receiver is not BoundValuePlaceholderBase && method is not null && receiver.Type?.IsReferenceType == false);
Binder\Binder_Conversions.cs (1)
644typeArgument.Type.IsReferenceType &&
Binder\Binder_Expressions.cs (3)
1385else if (typeWithAnnotations.NullableAnnotation.IsAnnotated() && type.IsReferenceType) 2748if (!targetType.IsReferenceType && !targetType.IsNullableType() && operand.IsLiteralNull()) 10978if ((!accessType.IsReferenceType && !accessType.IsValueType) || accessType.IsPointerOrFunctionPointer() || accessType.IsRestrictedType())
Binder\Binder_Invocation.cs (1)
1336if (receiver is BoundValuePlaceholderBase || receiver?.Type is null or { IsReferenceType: true })
Binder\Binder_Operators.cs (7)
845Debug.Assert(!right.Type.IsReferenceType); 849Debug.Assert(!left.Type.IsReferenceType); 2610if (receiver.Type.IsReferenceType) 3262if (targetType.IsReferenceType && targetTypeWithAnnotations.NullableAnnotation.IsAnnotated()) 3734if (targetType.IsReferenceType && targetTypeWithAnnotations.NullableAnnotation.IsAnnotated()) 3740else if (!targetType.IsReferenceType && !targetType.IsNullableType()) 4025if ((object)optLeftType != null && !optLeftType.IsReferenceType && !isLeftNullable)
Binder\LockBinder.cs (1)
52else if (!exprType.IsReferenceType && (exprType.IsValueType || Compilation.FeatureStrictEnabled))
Binder\Semantics\Conversions\Conversions.cs (2)
331if (!thisParameter.Type.IsReferenceType) 452if (methodGroup.IsExtensionMethodGroup && !method.Parameters[0].Type.IsReferenceType)
Binder\Semantics\Conversions\ConversionsBase.cs (8)
1254if (destination.IsReferenceType) 2633if (!source.IsReferenceType) 3318if (!source.IsValueType || !destination.IsReferenceType) 3466if (destination.IsReferenceType) 3471else if (source.Kind == SymbolKind.DynamicType && destination.IsReferenceType) 3709bool bothAreReferenceTypes = sourceArg.IsReferenceType && destinationArg.IsReferenceType; 3861if (source.IsReferenceType &&
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (8)
2109if (elementSource.Type.IsReferenceType) 2144if (!sourceElementType.Type.IsReferenceType || target.IsSpan()) 2421if ((sourceParam.Type.IsReferenceType || sourceParam.Type.IsFunctionPointer()) && sourceParam.RefKind == RefKind.None) 2431if ((sourceSignature.ReturnType.IsReferenceType || sourceSignature.ReturnType.IsFunctionPointer()) && sourceSignature.RefKind == RefKind.None) 2484Debug.Assert(source.Type.IsReferenceType || source.Type.IsFunctionPointer()); 2548if (elementSource.Type.IsReferenceType) 2771if ((sourceParam.Type.IsReferenceType || sourceParam.Type.IsFunctionPointer()) && sourceParam.RefKind == RefKind.None) 2781if ((sourceSignature.ReturnType.IsReferenceType || sourceSignature.ReturnType.IsFunctionPointer()) && sourceSignature.RefKind == RefKind.None)
CodeGen\CodeGenerator_HasHome.cs (1)
69if (type.IsReferenceType)
CodeGen\EmitAddress.cs (3)
41Debug.Assert(!expression.Type.IsReferenceType); 236Debug.Assert(!expression.Type.IsReferenceType); 372if (!receiver.Type.IsReferenceType)
CodeGen\EmitArrayInitializer.cs (1)
686if (elementType.IsReferenceType && elementType.SpecialType != SpecialType.System_String)
CodeGen\EmitExpression.cs (9)
379Debug.Assert(!expression.Type.IsReferenceType); 434var notConstrained = !receiverType.IsReferenceType && !receiverType.IsValueType; 443(receiverType.IsReferenceType && receiverType.TypeKind == TypeKind.TypeParameter) || 656if (!expression.Type.IsReferenceType) 1899callKind = receiverType.IsReferenceType && 2048if (!receiverType.IsReferenceType) 2106BoundConditionalReceiver { Type: { IsReferenceType: false, IsValueType: false } }) 2603if (rightType.IsReferenceType || (right.ConstantValueOpt != null && rightType.SpecialType != SpecialType.System_Decimal)) 3841Debug.Assert(expr.Type.IsReferenceType);
CodeGen\EmitOperators.cs (2)
459if (comparandType.IsReferenceType && !comparandType.IsVerifierReference()) 473if (comparandType.IsReferenceType && !comparandType.IsVerifierReference())
CodeGen\EmitStatement.cs (3)
218return ts.IsReferenceType; 534var complexCase = !receiverType.IsReferenceType || 611if (conditionType.IsReferenceType && !conditionType.IsVerifierReference())
CodeGen\Optimizer.cs (1)
1233if (receiverType.IsReferenceType)
Compilation\BuiltInOperators.cs (4)
880if (leftType.IsValueType || (!leftType.IsReferenceType && !rightIsNull)) 891if (rightType.IsValueType || (!rightType.IsReferenceType && !leftIsNull)) 900var leftIsReferenceType = ((object)leftType != null) && leftType.IsReferenceType; 906var rightIsReferenceType = ((object)rightType != null) && rightType.IsReferenceType;
FlowAnalysis\DefiniteAssignment.cs (1)
904if ((object)type != null && type.IsReferenceType &&
FlowAnalysis\NullableWalker.cs (4)
2547if (targetType.Type.IsReferenceType || 2632if (fieldOrPropertyType.Type.IsReferenceType || 7473return (type.Kind == SymbolKind.TypeParameter && !type.IsReferenceType) || type.IsNullableTypeOrTypeParameter(); 11673Debug.Assert(node.Type.IsReferenceType);
Lowering\ClosureConversion\ClosureConversion.cs (1)
700Debug.Assert(capturedFrame.Type.IsReferenceType); // Make sure we're not accidentally capturing a struct by value
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
760receiver = requiresInstanceReceiver ? nullObject : receiver.Type.IsReferenceType ? receiver : _bound.Convert(_objectType, receiver); 1118!node.ReceiverOpt.Type.IsReferenceType)
Lowering\DiagnosticsPass_Warnings.cs (1)
89if (IsNonAgileFieldAccess(fieldAccess, _compilation) && !fieldSymbol.Type.IsReferenceType)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
173receiver.Type?.IsReferenceType == false &&
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
469typeDecision.Type.IsReferenceType &&
Lowering\LocalRewriter\LocalRewriter_Call.cs (4)
281|| (!receiverOpt.Type.IsReferenceType && interceptor.Parameters[0].Type.IsReferenceType)); 695if (rewrittenReceiver.Type.IsReferenceType) 948if (!receiverType.IsReferenceType)
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (3)
474else if (!receiver.Type.IsReferenceType) 479Debug.Assert(receiver.Type.IsReferenceType); 950type.IsReferenceType ||
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.cs (1)
48if (loweredReceiver.IsDefaultValue() && receiverType.IsReferenceType)
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
498if (!receiver.Type.IsReferenceType && method.ContainingType.IsInterface)
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (2)
505receiver.Type.IsReferenceType ? RefKind.None : RefKind.Ref); 807receiver.Type.IsReferenceType ? RefKind.None : RefKind.Ref);
Lowering\LocalRewriter\LocalRewriter_LocalDeclaration.cs (1)
36if (!localSymbol.Type.IsReferenceType && localSymbol.ConstantValue == null)
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (2)
59var isUnconstrainedTypeParameter = rewrittenLeft.Type is { IsReferenceType: false, IsValueType: false }; 91if (rewrittenLeft.Type.IsReferenceType &&
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
702bool callWithoutCopy = expr.Type.IsReferenceType ||
Lowering\SpillSequenceSpiller.cs (6)
380if (refKind != RefKind.None || expression.Type.IsReferenceType) 563&& !receiverRefLocal.Type.IsReferenceType 1034Debug.Assert(refKind == RefKind.None || !receiver.Type.IsReferenceType); 1044Debug.Assert(!receiverType.IsReferenceType); 1074if (!receiver.Type.IsReferenceType && LocalRewriter.CanBePassedByReference(receiver)) 1286if (receiver.Type.IsReferenceType || receiver.Type.IsValueType || receiverRefKind == RefKind.None)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
145thisParameter.Type.IsReferenceType &&
Lowering\StateMachineRewriter\StateMachineRewriter.cs (1)
444if (method.IsStatic || method.ThisParameter.Type.IsReferenceType)
Lowering\SyntheticBoundNodeFactory.cs (2)
909Debug.Assert(left.Type.IsReferenceType); 1617return typeSymbol.IsReferenceType ? Null(typeSymbol, syntax) : Default(typeSymbol, syntax);
Symbols\AliasSymbol.cs (1)
410annotatedNamespaceOrType.TypeWithAnnotations.Type?.IsReferenceType is true)
Symbols\ConstantValueUtils.cs (1)
111typeSymbol.IsReferenceType &&
Symbols\ConstraintsHelper.cs (2)
975if (!typeArgument.Type.IsReferenceType) 1164if (typeArgument.Type.IsReferenceType)
Symbols\PublicModel\TypeSymbol.cs (1)
123return UnderlyingTypeSymbol.IsReferenceType;
Symbols\Source\SourceAssemblySymbol.cs (1)
2783if (type.IsReferenceType) return "null";
Symbols\Source\SourceComplexParameterSymbol.cs (1)
991if (this.Type.IsReferenceType)
Symbols\TypeParameterSymbol.cs (1)
405if (!constraint.IsReferenceType)
Symbols\TypeSymbol.cs (1)
2499bool ITypeSymbolInternal.IsReferenceType => this.IsReferenceType;
Symbols\TypeSymbolExtensions.cs (5)
40return type.IsReferenceType || type.IsPointerOrFunctionPointer() || type.IsNullableType(); 53return typeSymbol.IsReferenceType || typeSymbol.IsEnumType() || typeSymbol.SpecialType.CanBeConst() || typeSymbol.IsNativeIntegerType; 635if (type.IsReferenceType) 1526return type.IsReferenceType; 1669return type.IsReferenceType && type.TypeKind != TypeKind.TypeParameter;