http://d.puremagic.com/issues/show_bug.cgi?id=4544

           Summary: Better error-message when expecting string but got a
                    character constant
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2010-08-01 
07:01:28 PDT ---
In this example single quotes were used instead of double quotes by accident:

import std.stdio;

void main() {
    writeln('test');
}

This spits out way too many error lines:

test.d(5): unterminated character constant
test.d(5): found 'est' when expecting ','
test.d(5): unterminated character constant
test.d(5): found ';' when expecting ','
test.d(6): expression expected, not '}'
test.d(7): found 'EOF' when expecting ','
test.d(7): expression expected, not 'EOF'
test.d(7): found 'EOF' when expecting ','
test.d(7): expression expected, not 'EOF'
test.d(7): found 'EOF' when expecting ','
test.d(7): expression expected, not 'EOF'
test.d(7): found 'EOF' when expecting ','
test.d(7): expression expected, not 'EOF'
test.d(7): found 'EOF' when expecting ','
test.d(7): expression expected, not 'EOF'
test.d(7): found 'EOF' when expecting ','
test.d(7): expression expected, not 'EOF'
test.d(7): found 'EOF' when expecting ','
test.d(7): expression expected, not 'EOF'
test.d(7): found 'EOF' when expecting ','
test.d(7): expression expected, not 'EOF'

I'm hoping for a simpler error message than all of this. :)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to