History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-49504
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Dmitry Lomov
Reporter: Vladimir Reshetnikov
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
ReSharper

Take into account MS grammar extension, which allows query-expression as an operand of cast operator and a right operand of binary operators

Created: 19 Sep 07 12:14   Updated: 19 Sep 07 13:00
Component/s: PSI - Parser
Fix Version/s: 4.0
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 521


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.