Bug 27441

Summary: Better compiler error message for unexpected symbol/unexpected character.
Product: [Mono] Compilers Reporter: Marcin Kolny <marcin.kolny>
Component: C#Assignee: Marek Safar <masafa>
Status: RESOLVED FIXED    
Severity: normal CC: mono-bugs+mono
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Tags: Is this bug a regression?: ---
Last known good build:

Description Marcin Kolny 2015-02-25 19:30:29 UTC
Test case:

\u0001namespace Test
{
  class T1
  {
    static void Main(string[] args)
    {
    }
  }
}

mono c# compiler output:
error CS1525: Unexpected symbol `namespace'

visual c# compiler output:
error CS1056: Unexpected character '\u0020'

Microsoft's compiler output is a way better than mono's in that case - it displays real character representation as it is in a code.
I'm not sure about taking Visual C# as a pattern, but if we can do it - IMO we should.

What's your opinion about it?
Comment 1 Marek Safar 2015-02-27 10:57:57 UTC
Fixed in master