31 references to IsStructType
Microsoft.CodeAnalysis.CSharp (30)
Binder\Binder_Patterns.cs (1)
942
return type.
IsStructType
() && type.Name == "ValueTuple" && type.GetArity() == 0 &&
Binder\Binder_Statements.cs (1)
3739
if (containingType.
IsStructType
() || containingType.IsEnumType())
Binder\Semantics\Conversions\UserDefinedConversions.cs (1)
116
if (type.IsClassType() || type.
IsStructType
())
Compiler\MethodCompiler.cs (3)
1070
Debug.Assert(!prependedDefaultValueTypeConstructorInitializer || methodSymbol.ContainingType.
IsStructType
());
1084
((methodSymbol.ContainingType.
IsStructType
() && !methodSymbol.IsImplicitConstructor) ||
1790
if (method is SynthesizedPrimaryConstructor primaryCtor && method.ContainingType.
IsStructType
())
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
415
bool isStruct = AdaptedNamedTypeSymbol.
IsStructType
();
Emitter\NoPia\EmbeddedType.cs (1)
229
if (UnderlyingNamedType.AdaptedNamedTypeSymbol.
IsStructType
())
FlowAnalysis\EmptyStructTypeCache.cs (1)
134
return nts.
IsStructType
() && nts.SpecialType == SpecialType.None && !nts.KnownCircularStruct;
FlowAnalysis\FlowAnalysisPass.cs (1)
113
Debug.Assert(method.ContainingType.
IsStructType
());
FlowAnalysis\ReadWriteWalker.cs (1)
206
if (receiver.Type.
IsStructType
() && receiverSyntax.Span.OverlapsWith(RegionSpan))
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
966
(node.Arguments.Length == 0 && !node.Type.
IsStructType
()) ||
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
477
Debug.Assert(targetType.
IsStructType
());
Lowering\LocalRewriter\LocalRewriter.cs (1)
802
if (!lhsField.IsStatic && lhsField.ContainingType.
IsStructType
())
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
828
return structThisCanChangeValueBetweenReads && ((BoundThisReference)expression).Type.
IsStructType
();
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
289
Conversion receiverConversion = enumeratorType.
IsStructType
() ?
Lowering\StateMachineRewriter\StateMachineRewriter.cs (1)
241
var initialThis = containingType.
IsStructType
() ?
Symbols\MethodSymbol.cs (1)
365
protected bool IsValidReadOnlyTarget => !IsStatic && ContainingType.
IsStructType
() && MethodKind != MethodKind.Constructor && !IsInitOnly;
Symbols\MethodSymbolExtensions.cs (1)
219
method.ContainingType?.
IsStructType
() == true &&
Symbols\Source\SourceEventSymbol.cs (1)
485
if (this.ContainingType.
IsStructType
())
Symbols\Source\SourceMemberContainerSymbol.cs (1)
4561
if ((!hasParameterlessInstanceConstructor && this.
IsStructType
()) ||
Symbols\Source\SourceOrdinaryMethodSymbolBase.cs (2)
255
if (ContainingType.
IsStructType
())
276
Debug.Assert(ContainingType.
IsStructType
());
Symbols\Source\SourcePropertyAccessorSymbol.cs (2)
482
return ContainingType.
IsStructType
() &&
500
if (this.ContainingType.
IsStructType
())
Symbols\Source\SourcePropertySymbol.cs (1)
335
if (containingType.
IsStructType
())
Symbols\Source\ThisParameterSymbol.cs (1)
173
var scope = _containingType.
IsStructType
() ? ScopedKind.ScopedRef : ScopedKind.None;
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
99
Debug.Assert(!other.Type.
IsStructType
());
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
66
return !container.
IsStructType
() || container.IsReadOnly;
Symbols\Synthesized\SynthesizedEventAccessorSymbol.cs (1)
85
if (!IsAbstract && !AssociatedEvent.IsWindowsRuntimeEvent && !ContainingType.
IsStructType
() &&
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
13368
Assert.True(attribute.AttributeClass.
IsStructType
());