Skip to content

Extensions: adjust rewriting of anonymous type property symbols#80211

Merged
jcouv merged 2 commits intodotnet:mainfrom
jcouv:extensions-anonymous
Sep 11, 2025
Merged

Extensions: adjust rewriting of anonymous type property symbols#80211
jcouv merged 2 commits intodotnet:mainfrom
jcouv:extensions-anonymous

Conversation

@jcouv
Copy link
Member

@jcouv jcouv commented Sep 10, 2025

Fixes #80092
Relates to test plan #76130

@jcouv jcouv self-assigned this Sep 10, 2025
@jcouv jcouv added Area-Compilers Feature - Extension Everything The extension everything feature labels Sep 10, 2025
@jcouv jcouv marked this pull request as ready for review September 10, 2025 17:45
@jcouv jcouv requested a review from a team as a code owner September 10, 2025 17:45
@AlekseyTs
Copy link
Contributor

AlekseyTs commented Sep 10, 2025

    private new PropertySymbol? VisitPropertySymbol(PropertySymbol? property)

Is there still a need to keep this private method? #Closed


Refers to: src/Compilers/CSharp/Portable/Lowering/MethodToClassRewriter.cs:353 in a72ccd5. [](commit_id = a72ccd5, deletion_comment = False)

@AlekseyTs
Copy link
Contributor

AlekseyTs commented Sep 10, 2025

    private new FieldSymbol VisitFieldSymbol(FieldSymbol field)

Should we pull this implementation as an override to the base class and unify it with implementation in ExtensionMethodBodyRewriter? #Closed


Refers to: src/Compilers/CSharp/Portable/Lowering/MethodToClassRewriter.cs:387 in a72ccd5. [](commit_id = a72ccd5, deletion_comment = False)

@AlekseyTs
Copy link
Contributor

Consider adjusting the title to make it clear that this is about rewriting anonymous type property symbol references.

@AlekseyTs
Copy link
Contributor

Done with review pass (commit 1)

@jcouv jcouv changed the title Extensions: adjust rewriting of property symbols Extensions: adjust rewriting of anonymous type property symbols Sep 11, 2025
@jcouv jcouv requested review from AlekseyTs and jjonescz September 11, 2025 11:15
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 2)

@jcouv
Copy link
Member Author

jcouv commented Sep 11, 2025

@jjonescz for second review. Thanks

@jcouv jcouv merged commit 05e636f into dotnet:main Sep 11, 2025
24 checks passed
@jcouv jcouv deleted the extensions-anonymous branch September 11, 2025 13:05
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Sep 11, 2025
333fred added a commit to 333fred/roslyn that referenced this pull request Sep 11, 2025
* upstream/main: (233 commits)
  Extensions: add SyntaxGenerator support and AssociatedExtensionImplementation API (dotnet#80170)
  Fix error when hoisting a non-ref call (dotnet#80138)
  Ensure that refkinds are rewritten for complex methods (dotnet#79916)
  Revert
  Do not go through the workspace to access services
  DefiniteAssignmentPass.MarkFieldsUsed - avoid infinite recursion due to generic substitution (dotnet#80135)
  Reduce allocations in AnalyzerDriver.TryExecuteSymbolEndActions (dotnet#79855)
  RefSafetyAnalysis: Fix handling of nested deconstruction utilizing modern extensions (dotnet#80231)
  Extensions: adjust rewriting of anonymous type property symbols (dotnet#80211)
  Extensions: Move public APIs into INamedTypeSymbol (dotnet#80230)
  Extensions: improve error recovery in older language versions (dotnet#80206)
  Fall back to `dotnet exec` if apphost does not exist (dotnet#80153)
  Update dependencies from https://github.com/dotnet/dotnet build 282708 (dotnet#80228)
  Add a workaround for microsoft/vs-mef#620
  Revert "FailFast if the MEF composition is clearly broken"
  switch from windows combobox to visualstudio combobox (dotnet#80219)
  Update System.Text.Json in packages which use 4.12 Roslyn (dotnet#80197)
  add flags to unblock CI (dotnet#80222)
  Move static members to another type - qualifies static member references in the moved members (dotnet#80178)
  Fix broken link for C# 14 lambda parameter modifiers
  ...
@akhera99 akhera99 modified the milestones: Next, 18.0 P1, 18.0 P2 Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Feature - Extension Everything The extension everything feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C#14 Extensions: Bug/Issue With Expression Trees and/or Anonymous Classes

4 participants