Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Reapply keywordparams#101499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
stephentoub merged 2 commits intodotnet:mainfromjozkee:paramsspan-keyword
May 20, 2024
Merged

Conversation

@jozkee
Copy link
Member

@jozkeejozkee commentedApr 24, 2024
edited
Loading

Closes#101261.
Closes#77873.

Continuation of#101308.

@jozkeejozkee added this to the9.0.0 milestoneApr 24, 2024
@jozkeejozkee self-assigned thisApr 24, 2024
@ghost
Copy link

Note regarding thenew-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@stephentoub
Copy link
Member

We won't be able to merge this until the C# compiler is updated to guard overload resolution with params span on LangVersion.

jozkee reacted with thumbs up emoji

@jozkeejozkee added the NO-MERGEThe PR is not ready for merge yet (see discussion for detailed reasons) labelApr 24, 2024
This was referencedApr 24, 2024
@stephentoubstephentoub removed the NO-MERGEThe PR is not ready for merge yet (see discussion for detailed reasons) labelMay 14, 2024
@stephentoub
Copy link
Member

/azp run

@azure-pipelines
Copy link

You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

@stephentoubstephentoub merged commit5f067ce intodotnet:mainMay 20, 2024
@jozkeejozkee deleted the paramsspan-keyword branchMay 22, 2024 16:53
@jozkeejozkee added breaking-changeIssue or PR that represents a breaking API or functional change over a previous release. needs-breaking-change-doc-createdBreaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet labelsMay 22, 2024
@dotnet-policy-service
Copy link
Contributor

Addedneeds-breaking-change-doc-created label because this PR has thebreaking-change label.

When you commit this breaking change:

  1. Create and link to this PR and the issue a matching issue in the dotnet/docs repo using thebreaking change documentation template, then remove thisneeds-breaking-change-doc-created label.
  2. Ask a committer to mail the.NET Breaking Change Notification DL.

Tagging @dotnet/compat for awareness of the breaking change.

@stephentoub
Copy link
Member

@jozkee, why did you mark this as breaking? What is breaking about it?

@jozkee
Copy link
MemberAuthor

source breaking?

@stephentoub
Copy link
Member

Can you elaborate?

@jozkee
Copy link
MemberAuthor

jozkee commentedMay 22, 2024
edited
Loading

There's a case where a collection expression can't resolve betweenROS<string> andROS<object>, seedotnet/sdk#41089 (comment). It may be a compiler bug, though.

Additionally, do we not want to document cases of types with conditions similar to StringValues?

@cston
Copy link
Contributor

There's a case where a collection expression can't resolve betweenROS<string> andROS<object>, seedotnet/sdk#41089 (comment). It may be a compiler bug, though.

Currently, thebetter conversion rules for collection expressions treat this case as ambiguous.

Perhaps there should be an additional rule to preferSystem.ReadOnlySpan<E₁> overSystem.ReadOnlySpan<E₂> if an implicit conversion exists fromE₁ toE₂.

@stephentoub
Copy link
Member

There's a case where a collection expression can't resolve betweenROS<string> andROS<object>, seedotnet/sdk#41089 (comment). It may be a compiler bug, though.

Currently, thebetter conversion rules for collection expressions treat this case as ambiguous.

Perhaps there should be an additional rule to preferSystem.ReadOnlySpan<E₁> overSystem.ReadOnlySpan<E₂> if an implicit conversion exists fromE₁ toE₂.

I thought that was part of the first-class span support. Is it not,@333fred?

@cston
Copy link
Contributor

Perhaps there should be an additional rule to preferSystem.ReadOnlySpan<E₁> overSystem.ReadOnlySpan<E₂> if an implicit conversion exists fromE₁ toE₂.

I thought that was part of the first-class span support. Is it not,@333fred?

Unfortunately, implicit conversions from first-class span support may not be sufficient for a collection expression argument since implicit conversions are only considered inbetter conversion when the types arenot span types.

  • E is acollection expression and one of the following holds:
    • ...
    • T₁ is not aspan_type, andT₂ is not aspan_type, and an implicit conversion exists fromT₁ toT₂

Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull requestMay 30, 2024
Co-authored-by: Stephen Toub <stoub@microsoft.com>
@cston
Copy link
Contributor

Currently, thebetter conversion rules for collection expressions treat this case as ambiguous.

This is tracked bydotnet/roslyn#73857.

@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 8, 2024
@jozkee
Copy link
MemberAuthor

Note for breaking change doc: If this ship as is, it should be pointed out thatstring.Trim*(params ROS<char>) will hideextension methods which usually match the whole sequence while the one added here matches any of the characters.

See#102822 (comment).

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@stephentoubstephentoubstephentoub approved these changes

Assignees

@jozkeejozkee

Labels

area-System.Memorybreaking-changeIssue or PR that represents a breaking API or functional change over a previous release.needs-breaking-change-doc-createdBreaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet

Projects

None yet

Milestone

9.0.0

Development

Successfully merging this pull request may close these issues.

Reevaluateparams ReadOnlySpan<string> overloads from #77873 [API Proposal]: params ReadOnlySpan<T> overloads for existing params T[] overloads

3 participants

@jozkee@stephentoub@cston

[8]ページ先頭

©2009-2025 Movatter.jp