-
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
Support top level statements in event hookup #58475
Support top level statements in event hookup #58475
Conversation
} | ||
|
||
private static IMethodSymbol GetMethodSymbol( | ||
SemanticDocument semanticDocument, | ||
string eventHandlerMethodName, | ||
AssignmentExpressionSyntax eventHookupExpression, | ||
MethodKind methodKind, |
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.
@davidwengier While this change makes sense, I wonder how things were working in #50726 without this change?
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.
hmm.. good question. Perhaps a change in the code generation bits since then?
Apologies for not noticing the existing issue/pr
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.
Perhaps a change in the code generation bits since then?
I took a quick look from sourceroslyn.io and can't really find how this can affect anything. Going to open a quick draft to see what exactly fails as I'm curious.
Apologies for not noticing the existing issue/pr
No problem!
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.
Wouldn't be surprised if it's unnecessary, but I definitely saw a failure at one point where the access modifier was added to the local function, which obviously was wrong. I can't remember exactly what the rest of the code looked like at that point though :)
Fixes #58474