7 overrides of IsReferenceType
Microsoft.CodeAnalysis.CSharp (7)
Symbols\ArrayTypeSymbol.cs (1)
222
public override bool
IsReferenceType
Symbols\DynamicTypeSymbol.cs (1)
38
public override bool
IsReferenceType
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
73
public override bool
IsReferenceType
=> false;
Symbols\FunctionTypeSymbol.cs (1)
98
public override bool
IsReferenceType
=> true;
Symbols\NamedTypeSymbol.cs (1)
390
public override bool
IsReferenceType
Symbols\PointerTypeSymbol.cs (1)
93
public override bool
IsReferenceType
Symbols\TypeParameterSymbol.cs (1)
518
public sealed override bool
IsReferenceType
106 references to IsReferenceType
Microsoft.CodeAnalysis.CSharp (106)
Binder\Binder.ValueChecks.cs (1)
2388
Debug.Assert(receiver is not BoundValuePlaceholderBase && method is not null && receiver.Type?.
IsReferenceType
== false);
Binder\Binder_Conversions.cs (1)
644
typeArgument.Type.
IsReferenceType
&&
Binder\Binder_Expressions.cs (3)
1392
else if (typeWithAnnotations.NullableAnnotation.IsAnnotated() && type.
IsReferenceType
)
2793
if (!targetType.
IsReferenceType
&& !targetType.IsNullableType() && operand.IsLiteralNull())
11361
if ((!accessType.
IsReferenceType
&& !accessType.IsValueType) || accessType.IsPointerOrFunctionPointer() || accessType.IsRestrictedType())
Binder\Binder_Invocation.cs (1)
1392
if (receiver is BoundValuePlaceholderBase || receiver?.Type is null or {
IsReferenceType
: true })
Binder\Binder_Operators.cs (7)
990
Debug.Assert(!right.Type.
IsReferenceType
);
994
Debug.Assert(!left.Type.
IsReferenceType
);
3005
if (receiver.Type.
IsReferenceType
)
3657
if (targetType.
IsReferenceType
&& targetTypeWithAnnotations.NullableAnnotation.IsAnnotated())
4129
if (targetType.
IsReferenceType
&& targetTypeWithAnnotations.NullableAnnotation.IsAnnotated())
4135
else if (!targetType.
IsReferenceType
&& !targetType.IsNullableType())
4420
if ((object)optLeftType != null && !optLeftType.
IsReferenceType
&& !isLeftNullable)
Binder\LockBinder.cs (1)
52
else if (!exprType.
IsReferenceType
&& (exprType.IsValueType || Compilation.FeatureStrictEnabled))
Binder\Semantics\Conversions\Conversions.cs (1)
350
if (thisParameter?.Type.
IsReferenceType
== false)
Binder\Semantics\Conversions\ConversionsBase.cs (8)
1254
if (destination.
IsReferenceType
)
2631
if (!source.
IsReferenceType
)
3316
if (!source.IsValueType || !destination.
IsReferenceType
)
3464
if (destination.
IsReferenceType
)
3469
else if (source.Kind == SymbolKind.DynamicType && destination.
IsReferenceType
)
3707
bool bothAreReferenceTypes = sourceArg.
IsReferenceType
&& destinationArg.
IsReferenceType
;
3859
if (source.
IsReferenceType
&&
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (8)
2137
if (elementSource.Type.
IsReferenceType
)
2172
if (!sourceElementType.Type.
IsReferenceType
|| target.IsSpan())
2449
if ((sourceParam.Type.
IsReferenceType
|| sourceParam.Type.IsFunctionPointer()) && sourceParam.RefKind == RefKind.None)
2459
if ((sourceSignature.ReturnType.
IsReferenceType
|| sourceSignature.ReturnType.IsFunctionPointer()) && sourceSignature.RefKind == RefKind.None)
2512
Debug.Assert(source.Type.
IsReferenceType
|| source.Type.IsFunctionPointer());
2576
if (elementSource.Type.
IsReferenceType
)
2799
if ((sourceParam.Type.
IsReferenceType
|| sourceParam.Type.IsFunctionPointer()) && sourceParam.RefKind == RefKind.None)
2809
if ((sourceSignature.ReturnType.
IsReferenceType
|| sourceSignature.ReturnType.IsFunctionPointer()) && sourceSignature.RefKind == RefKind.None)
CodeGen\CodeGenerator_HasHome.cs (1)
69
if (type.
IsReferenceType
)
CodeGen\EmitAddress.cs (3)
41
Debug.Assert(!expression.Type.
IsReferenceType
);
236
Debug.Assert(!expression.Type.
IsReferenceType
);
372
if (!receiver.Type.
IsReferenceType
)
CodeGen\EmitArrayInitializer.cs (1)
686
if (elementType.
IsReferenceType
&& elementType.SpecialType != SpecialType.System_String)
CodeGen\EmitExpression.cs (9)
379
Debug.Assert(!expression.Type.
IsReferenceType
);
434
var notConstrained = !receiverType.
IsReferenceType
&& !receiverType.IsValueType;
443
(receiverType.
IsReferenceType
&& receiverType.TypeKind == TypeKind.TypeParameter) ||
656
if (!expression.Type.
IsReferenceType
)
1899
callKind = receiverType.
IsReferenceType
&&
2048
if (!receiverType.
IsReferenceType
)
2106
BoundConditionalReceiver { Type: {
IsReferenceType
: false, IsValueType: false } })
2603
if (rightType.
IsReferenceType
|| (right.ConstantValueOpt != null && rightType.SpecialType != SpecialType.System_Decimal))
3867
Debug.Assert(expr.Type.
IsReferenceType
);
CodeGen\EmitOperators.cs (2)
459
if (comparandType.
IsReferenceType
&& !comparandType.IsVerifierReference())
473
if (comparandType.
IsReferenceType
&& !comparandType.IsVerifierReference())
CodeGen\EmitStatement.cs (3)
218
return ts.
IsReferenceType
;
534
var complexCase = !receiverType.
IsReferenceType
||
611
if (conditionType.
IsReferenceType
&& !conditionType.IsVerifierReference())
CodeGen\Optimizer.cs (1)
1232
if (receiverType.
IsReferenceType
)
Compilation\BuiltInOperators.cs (4)
880
if (leftType.IsValueType || (!leftType.
IsReferenceType
&& !rightIsNull))
891
if (rightType.IsValueType || (!rightType.
IsReferenceType
&& !leftIsNull))
900
var leftIsReferenceType = ((object)leftType != null) && leftType.
IsReferenceType
;
906
var rightIsReferenceType = ((object)rightType != null) && rightType.
IsReferenceType
;
FlowAnalysis\DefiniteAssignment.cs (1)
904
if ((object)type != null && type.
IsReferenceType
&&
FlowAnalysis\NullableWalker.cs (4)
2645
if (targetType.Type.
IsReferenceType
||
2733
if (fieldOrPropertyType.Type.
IsReferenceType
||
7760
return (type.Kind == SymbolKind.TypeParameter && !type.
IsReferenceType
) || type.IsNullableTypeOrTypeParameter();
12031
Debug.Assert(node.Type.
IsReferenceType
);
Lowering\ClosureConversion\ClosureConversion.cs (1)
705
Debug.Assert(capturedFrame.Type.
IsReferenceType
); // Make sure we're not accidentally capturing a struct by value
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
760
receiver = requiresInstanceReceiver ? nullObject : receiver.Type.
IsReferenceType
? receiver : _bound.Convert(_objectType, receiver);
1118
!node.ReceiverOpt.Type.
IsReferenceType
)
Lowering\DiagnosticsPass_Warnings.cs (1)
89
if (IsNonAgileFieldAccess(fieldAccess, _compilation) && !fieldSymbol.Type.
IsReferenceType
)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
173
receiver.Type?.
IsReferenceType
== false &&
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
469
typeDecision.Type.
IsReferenceType
&&
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
281
|| (!receiverOpt.Type.
IsReferenceType
&& interceptor.Parameters[0].Type.IsReferenceType));
697
if (rewrittenReceiver.Type.
IsReferenceType
)
950
if (!receiverType.
IsReferenceType
)
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (4)
54
if (leftType.
IsReferenceType
)
532
else if (!receiver.Type.
IsReferenceType
)
537
Debug.Assert(receiver.Type.
IsReferenceType
);
1008
type.
IsReferenceType
||
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.cs (1)
48
if (loweredReceiver.IsDefaultValue() && receiverType.
IsReferenceType
)
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
497
if (!receiver.Type.
IsReferenceType
&& method.ContainingType.IsInterface)
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (2)
505
receiver.Type.
IsReferenceType
? RefKind.None : RefKind.Ref);
807
receiver.Type.
IsReferenceType
? RefKind.None : RefKind.Ref);
Lowering\LocalRewriter\LocalRewriter_LocalDeclaration.cs (1)
36
if (!localSymbol.Type.
IsReferenceType
&& localSymbol.ConstantValue == null)
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (2)
59
var isUnconstrainedTypeParameter = rewrittenLeft.Type is {
IsReferenceType
: false, IsValueType: false };
91
if (rewrittenLeft.Type.
IsReferenceType
&&
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
659
bool callWithoutCopy = expr.Type.
IsReferenceType
||
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (1)
425
if (operandType.
IsReferenceType
)
Lowering\SpillSequenceSpiller.cs (6)
380
if (refKind != RefKind.None || expression.Type.
IsReferenceType
)
563
&& !receiverRefLocal.Type.
IsReferenceType
1034
Debug.Assert(refKind == RefKind.None || !receiver.Type.
IsReferenceType
);
1044
Debug.Assert(!receiverType.
IsReferenceType
);
1074
if (!receiver.Type.
IsReferenceType
&& LocalRewriter.CanBePassedByReference(receiver))
1286
if (receiver.Type.
IsReferenceType
|| receiver.Type.IsValueType || receiverRefKind == RefKind.None)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
145
thisParameter.Type.
IsReferenceType
&&
Lowering\StateMachineRewriter\StateMachineRewriter.cs (1)
444
if (method.IsStatic || method.ThisParameter.Type.
IsReferenceType
)
Lowering\SyntheticBoundNodeFactory.cs (2)
927
Debug.Assert(left.Type.
IsReferenceType
);
1635
return typeSymbol.
IsReferenceType
? Null(typeSymbol, syntax) : Default(typeSymbol, syntax);
Symbols\AliasSymbol.cs (1)
410
annotatedNamespaceOrType.TypeWithAnnotations.Type?.
IsReferenceType
is true)
Symbols\ConstantValueUtils.cs (1)
111
typeSymbol.
IsReferenceType
&&
Symbols\ConstraintsHelper.cs (2)
990
if (!typeArgument.Type.
IsReferenceType
)
1179
if (typeArgument.Type.
IsReferenceType
)
Symbols\PublicModel\TypeSymbol.cs (1)
128
return UnderlyingTypeSymbol.
IsReferenceType
;
Symbols\Source\SourceAssemblySymbol.cs (1)
2783
if (type.
IsReferenceType
) return "null";
Symbols\Source\SourceComplexParameterSymbol.cs (1)
987
if (this.Type.
IsReferenceType
)
Symbols\TypeParameterSymbol.cs (1)
405
if (!constraint.
IsReferenceType
)
Symbols\TypeSymbol.cs (1)
2520
bool ITypeSymbolInternal.IsReferenceType => this.
IsReferenceType
;
Symbols\TypeSymbolExtensions.cs (5)
40
return type.
IsReferenceType
|| type.IsPointerOrFunctionPointer() || type.IsNullableType();
53
return typeSymbol.
IsReferenceType
|| typeSymbol.IsEnumType() || typeSymbol.SpecialType.CanBeConst() || typeSymbol.IsNativeIntegerType;
635
if (type.
IsReferenceType
)
1527
return type.
IsReferenceType
;
1670
return type.
IsReferenceType
&& type.TypeKind != TypeKind.TypeParameter;