Skip to content

Revert "Revert temporary ITypeSymbol extension APIs"#4404

Merged
ViktorHofer merged 1 commit intomainfrom
revert-2822-copilot/revert-commit-5edf9a1
Jan 26, 2026
Merged

Revert "Revert temporary ITypeSymbol extension APIs"#4404
ViktorHofer merged 1 commit intomainfrom
revert-2822-copilot/revert-commit-5edf9a1

Conversation

@sbomer
Copy link
Member

@sbomer sbomer commented Jan 24, 2026

Reverts #2822

To avoid breaking net10.0 projects, we'll need to ship dotnet/runtime#123509 before making this breaking change. @jjonescz @agocke

Copilot AI review requested due to automatic review settings January 24, 2026 20:42
@dotnet-policy-service dotnet-policy-service bot requested a review from a team January 24, 2026 20:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Restores the temporary ITypeSymbol “extension type” APIs that were previously reverted (per #2822), while directing consumers to prefer the INamedTypeSymbol equivalents.

Changes:

  • Re-adds ITypeSymbol.IsExtension and ITypeSymbol.ExtensionParameter as [Obsolete] members.
  • Updates implementations in C# PublicModel, VB TypeSymbol, and workspace codegen symbols (with version-guarding where needed).
  • Updates shipped/public API baselines and semantic search reference API lists.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/roslyn/src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/CodeGeneration/Symbols/CodeGenerationTypeSymbol.cs Adds conditional explicit ITypeSymbol implementations for the restored members for newer Roslyn builds.
src/roslyn/src/Tools/SemanticSearch/ReferenceAssemblies/Apis/Microsoft.CodeAnalysis.txt Updates the semantic-search reference API list to include the restored ITypeSymbol getters.
src/roslyn/src/Compilers/VisualBasic/Portable/Symbols/TypeSymbol.vb Implements the restored ITypeSymbol members on VB’s TypeSymbol.
src/roslyn/src/Compilers/Core/Portable/Symbols/ITypeSymbol.cs Restores the temporary APIs on ITypeSymbol and marks them obsolete with guidance to use INamedTypeSymbol.
src/roslyn/src/Compilers/Core/Portable/Symbols/INamedTypeSymbol.cs Adds new to INamedTypeSymbol members to resolve the newly introduced name collision from the base interface.
src/roslyn/src/Compilers/Core/Portable/PublicAPI.Shipped.txt Updates shipped API baseline to include the restored ITypeSymbol members.
src/roslyn/src/Compilers/CSharp/Portable/Symbols/PublicModel/TypeSymbol.cs Implements the restored ITypeSymbol members for C# public symbols.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ViktorHofer ViktorHofer merged commit 93b0344 into main Jan 26, 2026
16 of 17 checks passed
@ViktorHofer ViktorHofer deleted the revert-2822-copilot/revert-commit-5edf9a1 branch January 26, 2026 08:58
@dotnet-policy-service dotnet-policy-service bot requested a review from a team January 26, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants