1 write to EnumeratorInfoOpt
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
4047this.EnumeratorInfoOpt = enumeratorInfoOpt;
29 references to EnumeratorInfoOpt
Microsoft.CodeAnalysis.CSharp (29)
Binder\RefSafetyAnalysis.cs (2)
1055if (node.EnumeratorInfoOpt is { InlineArraySpanType: not WellKnownType.Unknown and var spanType, InlineArrayUsedAsValue: false }) 1063resultType: node.EnumeratorInfoOpt.GetEnumeratorInfo.Method.ContainingType,
Compilation\MemberSemanticModel.cs (1)
950ForEachEnumeratorInfo enumeratorInfoOpt = boundForEach.EnumeratorInfoOpt;
FlowAnalysis\NullableWalker.cs (12)
6566if (node is BoundForEachStatement { EnumeratorInfoOpt: { GetEnumeratorInfo: { Method: { TypeArgumentsWithAnnotations: { IsEmpty: false } } } } }) 10714if (node.EnumeratorInfoOpt?.GetEnumeratorInfo is { Method: { IsExtensionMethod: true, Parameters: var parameters } } enumeratorMethodInfo) 10781bool reportedDiagnostic = node.EnumeratorInfoOpt?.GetEnumeratorInfo.Method is { IsExtensionMethod: true } 10789if (node.EnumeratorInfoOpt is null) 10804TypeWithAnnotations.Create(node.EnumeratorInfoOpt.ElementType, NullableAnnotation.NotAnnotated).ToTypeWithState(); 10814if (node.EnumeratorInfoOpt is { InlineArraySpanType: not WellKnownType.Unknown and var wellKnownSpan }) 10825reinferredGetEnumeratorMethod = (MethodSymbol)AsMemberOfType(getEnumeratorType, node.EnumeratorInfoOpt.GetEnumeratorInfo.Method); 10838var currentPropertyGetter = (MethodSymbol)AsMemberOfType(enumeratorReturnType.Type, node.EnumeratorInfoOpt.CurrentPropertyGetter); 10847var moveNextAsyncMethod = (MethodSymbol)AsMemberOfType(reinferredGetEnumeratorMethod.ReturnType, node.EnumeratorInfoOpt.MoveNextInfo.Method); 10856if (node.EnumeratorInfoOpt is { NeedsDisposal: true, DisposeAwaitableInfo: BoundAwaitableInfo awaitDisposalInfo }) 10860if (node.EnumeratorInfoOpt.PatternDisposeInfo is { Method: var originalDisposeMethod }) // no statically known Dispose method if doing a runtime check 10884var sourceState = node.EnumeratorInfoOpt == null ? default : ResultType;
FlowAnalysis\NullableWalker.DebugVerifier.cs (4)
166if (node.EnumeratorInfoOpt != null) 168Visit(node.EnumeratorInfoOpt.DisposeAwaitableInfo); 169if (node.EnumeratorInfoOpt.GetEnumeratorInfo.Method.IsExtensionMethod) 171foreach (var arg in node.EnumeratorInfoOpt.GetEnumeratorInfo.Arguments)
Generated\BoundNodes.xml.Generated.cs (4)
4075if (enumeratorInfoOpt != this.EnumeratorInfoOpt || elementPlaceholder != this.ElementPlaceholder || elementConversion != this.ElementConversion || iterationVariableType != this.IterationVariableType || iterationVariables != this.IterationVariables || iterationErrorExpressionOpt != this.IterationErrorExpressionOpt || expression != this.Expression || deconstructionOpt != this.DeconstructionOpt || awaitOpt != this.AwaitOpt || body != this.Body || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(breakLabel, this.BreakLabel) || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(continueLabel, this.ContinueLabel)) 11395return node.Update(node.EnumeratorInfoOpt, elementPlaceholder, elementConversion, iterationVariableType, node.IterationVariables, iterationErrorExpressionOpt, expression, deconstructionOpt, awaitOpt, body, node.BreakLabel, node.ContinueLabel); 13438return node.Update(node.EnumeratorInfoOpt, elementPlaceholder, elementConversion, iterationVariableType, iterationVariables, iterationErrorExpressionOpt, expression, deconstructionOpt, awaitOpt, body, node.BreakLabel, node.ContinueLabel); 15870new TreeDumperNode("enumeratorInfoOpt", node.EnumeratorInfoOpt, null),
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (4)
56else if (node.EnumeratorInfoOpt is { InlineArraySpanType: not WellKnownType.Unknown }) 115ForEachEnumeratorInfo? enumeratorInfo = node.EnumeratorInfoOpt; 577Debug.Assert(node.EnumeratorInfoOpt is not null); 585node.EnumeratorInfoOpt,
Operations\CSharpOperationFactory.cs (2)
1860ForEachEnumeratorInfo? enumeratorInfoOpt = boundForEachStatement.EnumeratorInfoOpt; 1948IOperation collection = Create(boundForEachStatement.EnumeratorInfoOpt?.InlineArraySpanType is null or WellKnownType.Unknown ||