2 writes to CurrentType
Microsoft.CodeAnalysis.CSharp (2)
Lowering\SyntheticBoundNodeFactory.cs (2)
121this.CurrentType = currentClassOpt; 162CurrentType = nestedType;
40 references to CurrentType
Microsoft.CodeAnalysis.CSharp (40)
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (1)
40Debug.Assert(TypeSymbol.Equals(factory.CurrentType, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2));
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (4)
557LocalSymbol thisTemp = (F.CurrentType.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.CurrentType) : null; 618LocalSymbol thisTemp = (F.CurrentType.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.CurrentType) : null;
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
172if (F.CurrentType.TypeKind == TypeKind.Class)
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (1)
494var stateMachineType = (IteratorStateMachine)F.CurrentType;
Lowering\LocalRewriter\LocalRewriter.cs (1)
72Debug.Assert(TypeSymbol.Equals(factory.CurrentType, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2));
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
56Debug.Assert(_factory.CurrentType is { }); 57loweredReceiver = new BoundTypeExpression(node.Syntax, null, _factory.CurrentType);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
348containingType: _factory.CurrentType,
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (2)
15Debug.Assert(_factory.CurrentType is { }); 19var thisReference = new BoundThisReference(syntax, _factory.CurrentType);
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (2)
17Debug.Assert(_factory.CurrentType is { }); 23var thisReference = new BoundThisReference(syntax, _factory.CurrentType);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
183get { return ((SynthesizedContainer)F.CurrentType).TypeMap; }
Lowering\StateMachineRewriter\StateMachineRewriter.cs (8)
63Debug.Assert(TypeSymbol.Equals(F.CurrentType, method.ContainingType, TypeCompareKind.ConsiderEverything2)); 350var result = new SynthesizedStateMachineDebuggerHiddenMethod(methodName, methodToImplement, (StateMachineTypeSymbol)F.CurrentType, null, hasMethodBodyDependency); 351F.ModuleBuilderOpt.AddSynthesizedDefinition(F.CurrentType, result.GetCciAdapter()); 358var prop = new SynthesizedStateMachineProperty(getterToImplement, (StateMachineTypeSymbol)F.CurrentType); 359F.ModuleBuilderOpt.AddSynthesizedDefinition(F.CurrentType, prop.GetCciAdapter()); 362F.ModuleBuilderOpt.AddSynthesizedDefinition(F.CurrentType, getter.GetCciAdapter()); 370var result = new SynthesizedStateMachineMoveNextMethod(methodToImplement, (StateMachineTypeSymbol)F.CurrentType); 371F.ModuleBuilderOpt.AddSynthesizedDefinition(F.CurrentType, result.GetCciAdapter());
Lowering\SyntheticBoundNodeFactory.cs (16)
132if (CurrentType is { }) 134Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2)); 143TypeSymbol.Equals(CurrentFunction.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2)); 151ModuleBuilderOpt.AddSynthesizedDefinition(CurrentType, nestedType.GetCciAdapter()); 172Debug.Assert(CurrentType is { }); 173var result = new StateMachineFieldSymbol(CurrentType, type, name, isPublic, isThis); 174AddField(CurrentType, result); 180Debug.Assert(CurrentType is { }); 181var result = new StateMachineFieldSymbol(CurrentType, TypeWithAnnotations.Create(type), name, isPublic, isThis); 182AddField(CurrentType, result); 188Debug.Assert(CurrentType is { }); 189var result = new StateMachineFieldSymbol(CurrentType, type, name, synthesizedKind, slotIndex, isPublic: false); 190AddField(CurrentType, result); 196Debug.Assert(CurrentType is { }); 197var result = new StateMachineFieldSymbol(CurrentType, type, name, slotDebugInfo, slotIndex, isPublic: false); 198AddField(CurrentType, result);