-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Follow up on merge of ref-unsafe-in-iterators-async feature #73502
Conversation
IL_0031: leave.s IL_0033 | ||
} | ||
IL_0033: ldloca.s V_1 | ||
IL_0035: constrained. ""S2"" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
b34c41a
into
dotnet:features/RefStructInterfaces
No description provided.