Skip to content

Match CoreCLR behavior for NativeAOT string and array constructor invocation - #135287

Draft
jkotas with Copilot wants to merge 2 commits into
mainfrom
copilot/support-string-array-constructors
Draft

jkotas with Copilot wants to merge 2 commits into
mainfrom
copilot/support-string-array-constructors

Conversation

Copilot AI commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

NativeAOT currently ignores the existing object when invoking string or array pseudo-constructors. CoreCLR instead surfaces NotSupportedException through TargetInvocationException.

  • Implementation: Reject an existing target after argument validation, preserving exception wrapping.
  • Coverage: Enable the existing string and array constructor tests on NativeAOT; retain their Mono exclusions.

Note

This description was generated with GitHub Copilot.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
16 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

[NativeAOT] Support invoking string and array constructors on existing objects

2 participants