7 overrides of IsValueType
Microsoft.CodeAnalysis.CSharp (7)
Symbols\ArrayTypeSymbol.cs (1)
230
public override bool
IsValueType
Symbols\DynamicTypeSymbol.cs (1)
101
public override bool
IsValueType
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
74
public override bool
IsValueType
=> true;
Symbols\FunctionTypeSymbol.cs (1)
100
public override bool
IsValueType
=> false;
Symbols\NamedTypeSymbol.cs (1)
394
public override bool
IsValueType
Symbols\PointerTypeSymbol.cs (1)
101
public override bool
IsValueType
Symbols\TypeParameterSymbol.cs (1)
581
public sealed override bool
IsValueType
117 references to IsValueType
Microsoft.CodeAnalysis.CSharp (117)
Binder\Binder.ValueChecks.cs (5)
676
Debug.Assert(!checkingReceiver || expr.Type.
IsValueType
|| expr.Type.IsTypeParameter());
836
var isValueType = ((BoundThisReference)expr).Type.
IsValueType
;
1628
&& receiver?.Type?.
IsValueType
== true;
3631
Debug.Assert(!checkingReceiver || expr.Type.
IsValueType
|| expr.Type.IsTypeParameter());
4715
Debug.Assert(!checkingReceiver || expr.Type.
IsValueType
|| expr.Type.IsTypeParameter());
Binder\Binder_Expressions.cs (7)
1404
|| (typeWithAnnotations.NullableAnnotation.IsAnnotated() && !type.
IsValueType
)
5873
if (isRhsNestedInitializer && fieldSymbol.IsReadOnly && fieldSymbol.Type.
IsValueType
)
5996
if (propertySymbol.Type.
IsValueType
)
8550
hasError = (object)receiverType == null || !receiverType.
IsValueType
;
10976
if ((!accessType.IsReferenceType && !accessType.
IsValueType
) || accessType.IsPointerOrFunctionPointer() || accessType.IsRestrictedType())
11024
if (accessType.
IsValueType
&& !accessType.IsNullableType() && !accessType.IsVoidType())
11141
if (receiverType.
IsValueType
&& !receiverType.IsNullableType())
Binder\Binder_Invocation.cs (1)
1785
receiver.Type.
IsValueType
&&
Binder\Binder_Operators.cs (4)
3515
if (operandType.
IsValueType
&& targetType.IsClassType() && targetType.SpecialType != SpecialType.System_Enum ||
3516
targetType.
IsValueType
&& operandType.IsClassType() && operandType.SpecialType != SpecialType.System_Enum)
4034
if (!optLeftType.
IsValueType
)
4194
if (leftType.
IsValueType
&& !leftType.IsNullableType())
Binder\Binder_Statements.cs (1)
2374
if (targetType.
IsValueType
)
Binder\Binder_WithExpression.cs (1)
30
if (receiverType.
IsValueType
&& !receiverType.IsPointerOrFunctionPointer())
Binder\LockBinder.cs (1)
52
else if (!exprType.IsReferenceType && (exprType.
IsValueType
|| Compilation.FeatureStrictEnabled))
Binder\Semantics\Conversions\ConversionsBase.cs (4)
2257
if (!unwrappedSource.
IsValueType
)
3318
if (!source.
IsValueType
|| !destination.IsReferenceType)
3836
if (destination.
IsValueType
&& !destination.IsNullableType())
3845
destination.
IsValueType
&&
CodeGen\CodeGenerator_HasHome.cs (2)
54
if (addressKind == AddressKind.ReadOnly && !expression.Type.
IsValueType
&& peVerifyCompatEnabled)
229
if (receiver?.Type.
IsValueType
== true)
CodeGen\EmitAddress.cs (6)
42
Debug.Assert(!expression.Type.
IsValueType
|| expression.Type.IsNullableType());
65
Debug.Assert(expression.Type.
IsValueType
|| IsAnyReadOnly(addressKind), "'this' is readonly in classes");
67
if (expression.Type.
IsValueType
)
237
Debug.Assert(!expression.Type.
IsValueType
);
430
return !arrayAccess.Type.
IsValueType
;
530
Debug.Assert(receiverType.TypeKind == TypeKind.TypeParameter || receiverType.
IsValueType
);
CodeGen\EmitExpression.cs (12)
380
Debug.Assert(!expression.Type.
IsValueType
);
411
Debug.Assert(!receiverType.
IsValueType
||
434
var notConstrained = !receiverType.IsReferenceType && !receiverType.
IsValueType
;
654
Debug.Assert(!expression.Type.
IsValueType
);
812
if (thisType.
IsValueType
)
1171
if (fieldType.
IsValueType
&& (object)fieldType == (object)receiver.Type)
1227
if (receiver == null || !receiver.Type.
IsValueType
)
2025
if (callKind == CallKind.ConstrainedCallVirt && tempOpt is null && !receiverType.
IsValueType
&&
2093
return !receiverType.
IsValueType
;
2106
BoundConditionalReceiver { Type: { IsReferenceType: false,
IsValueType
: false } })
2654
if (left.Kind == BoundKind.ArrayAccess && left.Type.TypeKind == TypeKind.TypeParameter && !left.Type.
IsValueType
)
3189
Debug.Assert(thisRef.Type.
IsValueType
);
CodeGen\Optimizer.cs (3)
1037
Debug.Assert(lhs.Type.
IsValueType
, "'this' is assignable only in structs");
1357
if (receiver.Type.
IsValueType
&& (
2194
!arrayAccess.Type.
IsValueType
)
Compilation\BuiltInOperators.cs (2)
880
if (leftType.
IsValueType
|| (!leftType.IsReferenceType && !rightIsNull))
891
if (rightType.
IsValueType
|| (!rightType.IsReferenceType && !leftIsNull))
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
84
=> type is null || !(type.
IsValueType
|| type.IsErrorType());
FlowAnalysis\NullableWalker.cs (9)
752
if (symbolType.Type.
IsValueType
|| symbolType.Type.IsErrorType())
2326
type.Type.
IsValueType
)
4292
if (!initializer.Type.
IsValueType
&& GetState(ref State, slot).MayBeNull())
4846
Debug.Assert(!node.Expression.Type!.
IsValueType
);
4881
Debug.Assert(expressionType.
IsValueType
);
4918
else if (!operatorKind.IsDynamic() && !resultType.
IsValueType
)
9153
Debug.Assert(targetType.
IsValueType
|| targetType.IsErrorType());
11493
if (node.Type.
IsValueType
|| node.HasErrors || awaitableInfo.GetResult is null)
11882
bool isValueType = type.
IsValueType
;
Lowering\ClosureConversion\ClosureConversion.cs (1)
717
if (!framePointer.Type.
IsValueType
)
Lowering\LocalRewriter\LocalRewriter.cs (3)
1061
return !eventAccess.ReceiverOpt.Type.
IsValueType
|| CanBePassedByReference(eventAccess.ReceiverOpt);
1072
return !fieldAccess.ReceiverOpt.Type.
IsValueType
|| CanBePassedByReference(fieldAccess.ReceiverOpt);
1117
return expr is BoundConversion { Conversion: { IsInterpolatedStringHandler: true }, Type: {
IsValueType
: true } };
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
359
Debug.Assert(input.Type.
IsValueType
);
Lowering\LocalRewriter\LocalRewriter_AsOperator.cs (1)
45
Debug.Assert(!rewrittenType.
IsValueType
|| rewrittenType.IsNullableType());
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (1)
2080
!exprType.
IsValueType
||
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
691
refKind = rewrittenReceiver.Type.
IsValueType
|| rewrittenReceiver.Type.Kind == SymbolKind.TypeParameter ? RefKind.Ref : RefKind.None;
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
201
if (getEnumeratorMethod?.ReturnType.
IsValueType
== true)
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
203
var variableRepresentsLocation = rewrittenReceiver.Type.
IsValueType
|| rewrittenReceiver.Type.Kind == SymbolKind.TypeParameter;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (2)
901
userDefinedConversionRewrittenType.
IsValueType
)
1351
parameterType.
IsValueType
)
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
332
bool needNullCheck = !initializerType.
IsValueType
|| initializerType.IsNullableType();
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
390
if (enumeratorType.
IsValueType
)
Lowering\LocalRewriter\LocalRewriter_NullCoalescingOperator.cs (2)
59
var isUnconstrainedTypeParameter = rewrittenLeft.Type is { IsReferenceType: false,
IsValueType
: false };
243
Debug.Assert(rewrittenLeftType.IsNullableType() || !rewrittenLeftType.
IsValueType
);
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (1)
177
if (type.
IsValueType
)
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (2)
663
if (expr.Type.
IsValueType
&& !expr.Type.IsTypeParameter())
708
if (expr.Type.
IsValueType
)
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
385
else if (local.Type.
IsValueType
)
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
545
if (!loweredReceiver.Type.
IsValueType
)
Lowering\SpillSequenceSpiller.cs (2)
564
&& !receiverRefLocal.Type.
IsValueType
1286
if (receiver.Type.IsReferenceType || receiver.Type.
IsValueType
|| receiverRefKind == RefKind.None)
Lowering\SyntheticBoundNodeFactory.cs (1)
1752
!exprType.
IsValueType
||
Symbols\ConstraintsHelper.cs (5)
474
Debug.Assert(!deducedBase.
IsValueType
|| typeParameter.HasReferenceTypeConstraint);
475
diagnosticsBuilder.Add(GenerateConflictingConstraintsError(typeParameter, deducedBase, classConflict: deducedBase.
IsValueType
));
1206
if (type.
IsValueType
)
1245
if (type is null || type.
IsValueType
)
1339
if (typeArgument.Type.
IsValueType
)
Symbols\NamedTypeSymbol.cs (1)
358
if ((thisParam.RefKind == RefKind.Ref && !thisParam.Type.
IsValueType
) ||
Symbols\NullableAnnotationExtensions.cs (1)
137
NullableAnnotation.Oblivious when type?.
IsValueType
== true => CodeAnalysis.NullableAnnotation.NotAnnotated,
Symbols\PlaceholderTypeArgumentSymbol.cs (1)
14
/// <see cref="TypeSymbol.
IsValueType
"/> with minimal binding.
Symbols\PublicModel\TypeSymbol.cs (2)
70
!(UnderlyingTypeSymbol.
IsValueType
&& !UnderlyingTypeSymbol.IsNullableType()))
131
return UnderlyingTypeSymbol.
IsValueType
;
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
351
static (type, arg, flag) => !type.Type.
IsValueType
&& !type.NullableAnnotation.IsOblivious(),
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
218
else if (parameter0RefKind == RefKind.Ref && !parameter0Type.Type.
IsValueType
)
Symbols\Source\TypeParameterConstraintClause.cs (1)
184
else if (type.
IsValueType
)
Symbols\TypeParameterSymbol.cs (1)
510
if (constraintType.Type.
IsValueType
)
Symbols\TypeSymbol.cs (1)
2501
bool ITypeSymbolInternal.IsValueType => this.
IsValueType
;
Symbols\TypeSymbolExtensions.cs (5)
46
return !type.
IsValueType
|| type.IsNullableTypeOrTypeParameter();
97
if (!typeArgument.
IsValueType
)
146
return type is {
IsValueType
: true }
640
if (type.
IsValueType
)
1677
return type.
IsValueType
&& type.TypeKind != TypeKind.TypeParameter;
Symbols\TypeWithAnnotations.cs (13)
110
if (NullableAnnotation.IsAnnotated() || (Type.
IsValueType
&& Type.IsNullableType()))
120
if (NullableAnnotation.IsNotAnnotated() || (Type.
IsValueType
&& !Type.IsNullableType()))
202
if (!typeSymbol.
IsValueType
&& !typeSymbol.IsErrorType())
309
(!HasType || (!IsNullableType() && !Type.
IsValueType
)))
315
(!HasType || (!Type.
IsValueType
&& !Type.IsTypeParameterDisallowingAnnotationInCSharp8())))
378
bool isValueType = type.
IsValueType
&& !type.IsNullableType();
596
typeWithAnnotationsPredicate: (t, a, b) => t.NullableAnnotation != NullableAnnotation.Oblivious && !t.Type.IsErrorType() && !t.Type.
IsValueType
,
617
return type.
IsValueType
;
635
if (annotation.IsOblivious() || type.
IsValueType
)
727
if (NullableAnnotation.IsNotAnnotated() || (typeSymbol.
IsValueType
&& !typeSymbol.IsNullableType()))
743
if (!typeSymbol.
IsValueType
&& !typeSymbol.IsNullableType())
1084
TryForceResolve(asValueType: _underlying.Type.
IsValueType
);
1145
if (!_underlying.Type.
IsValueType
)
Symbols\TypeWithState.cs (1)
93
(Type?.
IsValueType
== true ? NullableAnnotation.NotAnnotated : NullableAnnotation.Annotated) :