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

Follow up on merge of ref-unsafe-in-iterators-async feature #73502

Conversation

AlekseyTs
Copy link
Contributor

No description provided.

@AlekseyTs AlekseyTs requested review from jjonescz and cston May 16, 2024 01:00
@AlekseyTs AlekseyTs requested a review from a team as a code owner May 16, 2024 01:00
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label May 16, 2024
@AlekseyTs
Copy link
Contributor Author

@cston, @jjonescz, @dotnet/roslyn-compiler Please review.

IL_0031: leave.s IL_0033
}
IL_0033: ldloca.s V_1
IL_0035: constrained. ""S2""
Copy link
Member

@jaredpar jaredpar May 16, 2024

Choose a reason for hiding this comment

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

Interesting. I didn't realize constrained calls worked in non generics. #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting. I didn't realize constrained calls worked in non generics.

That is the way to call interface methods on structs without boxing


comp.VerifyDiagnostics(
// PROTOTYPE(RefStructInterfaces): follow up on recent changes due to https://github.com/dotnet/csharplang/blob/main/proposals/ref-unsafe-in-iterators-async.md
// (18,22): error CS9104: A using statement resource of type 'S2' cannot be used in async methods or async lambda expressions.
Copy link
Member

@jjonescz jjonescz May 16, 2024

Choose a reason for hiding this comment

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

Consider keeping this verification for LangVersion=12 #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Consider keeping this verification for LangVersion=12

I do not find that particularly interesting for the scenarios tested in this PR because the ref-struct-interfaces feature isn't supported in C# 12 either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - RefStructInterfaces 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.

3 participants