-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Warn if we're offering a Coalesce Expression inside an ExpressionOfT. #17264
Warn if we're offering a Coalesce Expression inside an ExpressionOfT. #17264
Conversation
The change from |
Tagging @dotnet/roslyn-ide |
Tagging @dotnet/roslyn-ide |
I disagree with this fix. Why warning for the coalesce code fix only? Expression consumers can lack support for arbitrary set of expressions, and any fix potentially changes the behavior. |
I mean it's not even about supporting the expressions or not. The consumer might support them all, but not be executing them. Could be serializing it or hashing it or whatever and things might break. EDIT: The code fixes work under the assumption of C# spec and execution equivalence. If this should be fixed on Roslyn side then I think all code fixes inside ExpressionOfT should be with warning at least. |
There is no claim that the warning would only be for coalesce expressions. We're just happening to start with that. I'm happy to add more warnings in the future for other features as well. |
That's fine. We can do that. |
That's fair. |
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.
👍
Mitigation for #17028