2 writes to CurrentType
Microsoft.CodeAnalysis.CSharp (2)
Lowering\SyntheticBoundNodeFactory.cs (2)
126
this.
CurrentType
= currentClassOpt;
167
CurrentType
= nestedType;
43 references to CurrentType
Microsoft.CodeAnalysis.CSharp (43)
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (1)
41
Debug.Assert(TypeSymbol.Equals(factory.
CurrentType
, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2));
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (4)
582
LocalSymbol thisTemp = (F.
CurrentType
.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.
CurrentType
) : null;
643
LocalSymbol thisTemp = (F.
CurrentType
.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.
CurrentType
) : null;
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
172
if (F.
CurrentType
.TypeKind == TypeKind.Class)
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (1)
501
var stateMachineType = (IteratorStateMachine)F.
CurrentType
;
Lowering\LocalRewriter\LocalRewriter.cs (1)
72
Debug.Assert(TypeSymbol.Equals(factory.
CurrentType
, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2));
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
56
Debug.Assert(_factory.
CurrentType
is { });
57
Debug.Assert(!_factory.
CurrentType
.IsExtension); // When binding a simple name for a call, you cannot get a member inside an extension type
58
loweredReceiver = new BoundTypeExpression(node.Syntax, null, _factory.
CurrentType
);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
357
containingType: _factory.
CurrentType
,
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (2)
15
Debug.Assert(_factory.
CurrentType
is { });
19
var thisReference = new BoundThisReference(syntax, _factory.
CurrentType
);
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (2)
17
Debug.Assert(_factory.
CurrentType
is { });
23
var thisReference = new BoundThisReference(syntax, _factory.
CurrentType
);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
187
get { return ((SynthesizedContainer)F.
CurrentType
).TypeMap; }
Lowering\StateMachineRewriter\StateMachineRewriter.cs (8)
63
Debug.Assert(TypeSymbol.Equals(F.
CurrentType
, method.ContainingType, TypeCompareKind.ConsiderEverything2));
354
var result = new SynthesizedStateMachineDebuggerHiddenMethod(methodName, methodToImplement, (StateMachineTypeSymbol)F.
CurrentType
, null, hasMethodBodyDependency);
355
F.ModuleBuilderOpt.AddSynthesizedDefinition(F.
CurrentType
, result.GetCciAdapter());
362
var prop = new SynthesizedStateMachineProperty(getterToImplement, (StateMachineTypeSymbol)F.
CurrentType
);
363
F.ModuleBuilderOpt.AddSynthesizedDefinition(F.
CurrentType
, prop.GetCciAdapter());
366
F.ModuleBuilderOpt.AddSynthesizedDefinition(F.
CurrentType
, getter.GetCciAdapter());
374
var result = new SynthesizedStateMachineMoveNextMethod(methodToImplement, (StateMachineTypeSymbol)F.
CurrentType
);
375
F.ModuleBuilderOpt.AddSynthesizedDefinition(F.
CurrentType
, result.GetCciAdapter());
Lowering\SyntheticBoundNodeFactory.cs (18)
137
if (
CurrentType
is { })
139
Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType,
CurrentType
, TypeCompareKind.ConsiderEverything2));
148
TypeSymbol.Equals(CurrentFunction.ContainingType,
CurrentType
, TypeCompareKind.ConsiderEverything2));
177
Debug.Assert(
CurrentType
is { });
178
var result = new StateMachineFieldSymbol(
CurrentType
, type, name, isPublic, isThis);
179
AddField(
CurrentType
, result);
185
Debug.Assert(
CurrentType
is { });
186
var result = new StateMachineFieldSymbol(
CurrentType
, TypeWithAnnotations.Create(type), name, isPublic, isThis);
187
AddField(
CurrentType
, result);
193
Debug.Assert(
CurrentType
is { });
194
var result = new StateMachineFieldSymbolForRegularParameter(
CurrentType
, TypeWithAnnotations.Create(type), name, parameter, isPublic);
195
AddField(
CurrentType
, result);
201
Debug.Assert(
CurrentType
is { });
202
var result = new StateMachineFieldSymbol(
CurrentType
, type, name, synthesizedKind, slotIndex, isPublic: false);
203
AddField(
CurrentType
, result);
209
Debug.Assert(
CurrentType
is { });
210
var result = new StateMachineFieldSymbol(
CurrentType
, type, name, slotDebugInfo, slotIndex, isPublic: false);
211
AddField(
CurrentType
, result);