"Yes the compiler is more lenient than it should be, although the lenience seems to be entirely benign. We cannot fix this at the current point in time, so we will have to live with the discrepancy from the spec. If we ever fix it it will be a breaking change, so we probably never will."
So, ReSharper should correctly parse this code to be in agreement with the compiler.
IMHO, it makes sense to show a warning "This expression does not conform to the standard. Some implementations may reject it."
And a QF to take a query expression into parentheses.
Description
class Program
{
static void Main(string[] args)
{
var x = (IEnumerable) from s in args select s;
if(x == from s in args select s) { }
}
}
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=297667&wa=wsignin1.0
"Yes the compiler is more lenient than it should be, although the lenience seems to be entirely benign. We cannot fix this at the current point in time, so we will have to live with the discrepancy from the spec. If we ever fix it it will be a breaking change, so we probably never will."
So, ReSharper should correctly parse this code to be in agreement with the compiler.
IMHO, it makes sense to show a warning "This expression does not conform to the standard. Some implementations may reject it."
And a QF to take a query expression into parentheses.