Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more first-class Span tests #75414

Merged
merged 3 commits into from
Oct 17, 2024
Merged

Conversation

jjonescz
Copy link
Member

@jjonescz jjonescz commented Oct 7, 2024

Test plan: #73445

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Oct 7, 2024
@jjonescz jjonescz marked this pull request as ready for review October 7, 2024 14:22
@jjonescz jjonescz requested a review from a team as a code owner October 7, 2024 14:22
@jjonescz jjonescz requested review from 333fred and cston October 7, 2024 14:22
@jjonescz jjonescz changed the base branch from features/FirstClassSpan to main October 10, 2024 18:29
@jjonescz
Copy link
Member Author

@cston @333fred for test-only review, thanks


class C
{
public static implicit operator C(string s) => new C();
Copy link
Member

Choose a reason for hiding this comment

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

public static implicit operator C(string s) => new C();

Does this overload have any effect? (Or should the argument be string[] instead?)

ReadOnlySpan<int> M(Span<int> s) => s;
}
""";
var comp2 = CreateCompilation(source2, [comp1Ref]);
Copy link
Member

Choose a reason for hiding this comment

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

When we're doing a retargeting test, it's usually good practice to explicitly specify the underlying TFM for the second compilation, so we can be sure that it's a different TFM from the assembly that will be retargeted.

@jjonescz jjonescz enabled auto-merge (squash) October 17, 2024 10:39
@jjonescz jjonescz merged commit a2b5cbb into dotnet:main Oct 17, 2024
24 checks passed
@jjonescz jjonescz deleted the FirstClassSpan-22-Tests branch October 17, 2024 11:49
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 17, 2024
@akhera99 akhera99 modified the milestones: Next, 17.13 P1 Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - First-class Span Types untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants