Skip to content

Reject C# continuation lines as function declarations #4831

Description

@Widthdom

Summary

The C# declaration scanner treats non-declaration continuation lines as functions in two current shapes: one multiline LINQ invocation creates six definitions of GetIndexedLanguageCount, and multiline method-parameter continuations create functions named out or params.

Audit IDs: G-02 and P-01. Reproduced on v1.40.3 at 404db09489c305f17d94f37026e00564d3ac527a.

Existing issue relationship

These are current regressions of closed #496 (multiline call arguments becoming phantom functions) and closed #4413 (multiline out parameter continuations becoming functions). Reference both prior fixes when implementing.

Expected behavior

Only syntactically eligible declaration starts may enter the method/local-function parser. Invocation arguments and parameter continuation lines must not create symbols.

PR scope

Both reproductions share the C# declaration/expression-boundary scanner and belong in one PR. Static-lambda and reference-extraction findings remain separate.

Implementation guide for Codex 5.6 sol xhigh

Acceptance criteria

  • The invocation yields one real definition, not six call-expression definitions.
  • No parameter continuation creates an out/params function.
  • Valid multiline declarations remain unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions