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

Select from namespace doesn't issue error #14689

Closed
jaredpar opened this issue Oct 23, 2016 · 2 comments
Closed

Select from namespace doesn't issue error #14689

jaredpar opened this issue Oct 23, 2016 · 2 comments
Assignees
Labels
Area-Compilers Bug Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings.
Milestone

Comments

@jaredpar
Copy link
Member

Consider the following code:

using System.Linq;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
        }

        public static int Test()
        {
            var x = from c in ConsoleApp
                    select 3;
            return x.First();
        }
    }
}

This code is invalid and fails to compile. The error though is the emit catch all "failed to emit". That means the compiler is issuing an error earlier and not surfacing it. In larger programs that makes the problem very difficult to track down. Need to correct this.

@jaredpar
Copy link
Member Author

Note that it's possible this error has already been fixed. I tried the repro on VS2015U3 but not on Dev15 yet.

@OmarTawfik
Copy link
Contributor

Could repro in Dev15 Preview 5. Will look into a fix now.

@jaredpar jaredpar modified the milestones: 2.1, 2.0 (RTM) Jan 12, 2017
@jaredpar jaredpar added the Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. label Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings.
Projects
None yet
Development

No branches or pull requests

2 participants