6 references to ContainingType
Microsoft.CodeAnalysis.CSharp (6)
Binder\Binder.CapturedParametersFinder.cs (1)
45var containingType = primaryConstructor.ContainingType;
FlowAnalysis\DefiniteAssignment.cs (1)
1824Diagnostics.Add((primaryCtor.ContainingType is { IsRecord: true } or { IsRecordStruct: true }) ?
Lowering\LocalRewriter\LocalRewriter.cs (1)
280var result = new BoundFieldAccess(node.Syntax, new BoundThisReference(node.Syntax, primaryCtor.ContainingType), field, ConstantValue.NotAvailable, LookupResultKind.Viable, node.Type);
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (3)
51protected override bool AllowRefOrOut => !(ContainingType is { IsRecord: true } or { IsRecordStruct: true }); 57return ContainingType.IsNullableEnabledForConstructorsAndInitializers(IsStatic); 93if (ContainingType is { IsRecord: true } or { IsRecordStruct: true } || ParameterCount == 0)