Skip to content

test: cover imported extension assembly identity collisions#2805

Merged
DavidObando merged 2 commits into
mainfrom
fix/issue-2801
Jul 25, 2026
Merged

test: cover imported extension assembly identity collisions#2805
DavidObando merged 2 commits into
mainfrom
fix/issue-2801

Conversation

@DavidObando

Copy link
Copy Markdown
Owner

Summary

  • add an order-independent regression for colliding extension-host type names across assemblies
  • verify the emitted MemberRef retains the declaring assembly identity
  • execute the emitted program to guard against wrong-assembly runtime dispatch

The reported failure does not reproduce on current main; history shows declaring-assembly emission predates the affected release line. This PR therefore records the invariant as regression coverage rather than claiming a production behavior change.

Security

The regression covers assembly/type confusion where a same-named type in another referenced assembly could otherwise capture a member reference and redirect or break execution. No new runtime surface is introduced.

Tests

  • dotnet test test/Compiler.Tests/Compiler.Tests.csproj --filter FullyQualifiedName~ImportedExtensionDeclaringAssemblyInvariantEmitTests --no-restore --nologo

Closes #2801

Document the declaring-assembly invariant and cover colliding extension-host type names with metadata and runtime assertions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5a96d2bd-106a-4cb2-87ee-cef68a8a77f9
Replace the issue-specific fix framing with reference-order-independent metadata and runtime coverage for colliding extension host type names.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5a96d2bd-106a-4cb2-87ee-cef68a8a77f9
@DavidObando
DavidObando merged commit e6b4f2a into main Jul 25, 2026
19 of 20 checks passed
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.

gsc: imported extension MemberRef targets wrong assembly when extension-host type names collide

1 participant