digitalmars.D.bugs - [Issue 4544] New: Better error-message when expecting string but got a character constant
- d-bugmail puremagic.com (45/45) Aug 01 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4544
- d-bugmail puremagic.com (6/6) Aug 01 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4544
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: nobody puremagic.com
ReportedBy: andrej.mitrovich gmail.com
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: -------
Aug 01 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4544 10:49:25 PDT --- I'm sorry, I meant "literal", not constant. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 01 2010








d-bugmail puremagic.com