Skip to content

Ensure that locals at the top level of a constructor have the same safe-context as parameters#80807

Merged
RikkiGibson merged 4 commits intodotnet:mainfrom
RikkiGibson:constructor-local-safe-context
Oct 23, 2025
Merged

Ensure that locals at the top level of a constructor have the same safe-context as parameters#80807
RikkiGibson merged 4 commits intodotnet:mainfrom
RikkiGibson:constructor-local-safe-context

Conversation

@RikkiGibson
Copy link
Member

Closes #80745

@RikkiGibson RikkiGibson requested a review from a team as a code owner October 18, 2025 00:16
Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (commit 1)

@RikkiGibson RikkiGibson requested a review from a team October 20, 2025 19:44
""");
}

[Fact]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding WorkItem attributes

@RikkiGibson RikkiGibson enabled auto-merge (squash) October 22, 2025 19:56
@333fred
Copy link
Member

333fred commented Oct 23, 2025

@RikkiGibson test failures look legitimate.

@RikkiGibson
Copy link
Member Author

RikkiGibson commented Oct 23, 2025

It looks like a test added in #80807 needs an updated baseline as a result of this change

So, the request to add WorkItemAttributes, caused the collision of the PRs to occur here instead of in main, I think.

@RikkiGibson RikkiGibson merged commit 3eae1b8 into dotnet:main Oct 23, 2025
23 of 24 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 23, 2025
333fred added a commit to 333fred/roslyn that referenced this pull request Oct 24, 2025
* upstream/main: (332 commits)
  Cache lambdas in analyzer driver (dotnet#80759)
  Add information for NuGet package version 4.14 (dotnet#80870)
  Add missing search keywords to VB Advanced options page
  Fix IDE0031 false positive when preprocessor directives are used in if statements (dotnet#80878)
  Use core compiler on netfx hosts with toolset package (dotnet#80631)
  Make string concat assert more precise (dotnet#80619)
  Extensions: address some diagnostic quality issues (dotnet#80827)
  Add note on traversal order for bound nodes (dotnet#80872)
  Ensure that locals at the top level of a constructor have the same safe-context as parameters (dotnet#80807)
  Fix handling of SymbolDisplayCompilerInternalOptions.UseArityForGenericTypes option for non-native symbol implementations (dotnet#80826)
  Update src/Analyzers/CSharp/Tests/UseCollectionInitializer/UseCollectionInitializerTests.cs
  Add IsValidContainingStatement check to prevent collection initializers in using declarations
  Add back old DocumentSpan constructor (dotnet#80864)
  Add tests verifying pointer types in type parameters require unsafe context (dotnet#80776)
  Add regression test for Interlocked.Exchange with nullable types (dotnet#80796)
  Add regression test for ParseAttributeArgumentList with invalid input (fixes dotnet#8699) (dotnet#80705)
  Add regression test for compiler crash with syntax error in indexer declaration (dotnet#80772)
  Add runtime NullReferenceException validation to foreach null iteration tests (dotnet#80839)
  Update MicrosoftBuildTasksCoreVersionForMetrics to 17.11.48 (dotnet#80812)
  Mark CS4009 error as a "build only" error. (dotnet#80698)
  ...
@davidwengier davidwengier modified the milestones: Next, 18.3 Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scoped constructor parameters should be able to reference top-level locals

5 participants