Skip to content
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

Compiler sensitive to newline in parsing an expression #17683

Closed
gafter opened this issue Mar 10, 2017 · 0 comments
Closed

Compiler sensitive to newline in parsing an expression #17683

gafter opened this issue Mar 10, 2017 · 0 comments
Assignees
Labels
Area-Compilers Bug Language-C# Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Milestone

Comments

@gafter
Copy link
Member

gafter commented Mar 10, 2017

In VS2017 (C# 7), the compiler now rejects the following. Eliminating the newline before MinValue allows it to compile. This code compiled in previous versions of the product.

See also our internal VSO bug tracking this and the community feedback page.

using System;
using System.Linq;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = from t in Enumerable.Range(0, 10)
                    where
                    t == Int32.
                    MinValue
                    select t;
        }
    }
}
@gafter gafter added this to the 15.3 milestone Mar 10, 2017
@gafter gafter self-assigned this Mar 10, 2017
@gafter gafter modified the milestones: 15.3, 15.1 Mar 10, 2017
gafter added a commit to gafter/roslyn that referenced this issue Mar 10, 2017
@gafter gafter added 4 - In Review A fix for the issue is submitted for review. and removed 2 - Ready labels Mar 10, 2017
@jaredpar jaredpar modified the milestones: 15.3, 15.1 Mar 15, 2017
@gafter gafter added Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented and removed 4 - In Review A fix for the issue is submitted for review. labels Mar 15, 2017
gafter added a commit that referenced this issue Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Language-C# Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Projects
None yet
Development

No branches or pull requests

2 participants