[Issue 12155] New: Better line and column numbers for missing semicolon
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 13 17:54:58 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12155
Summary: Better line and column numbers for missing semicolon
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2014-02-13 17:54:55 PST ---
D forces on the programmer the burden to end lines of code with a semicolon
(unline Scala, Go and other language), this is supposed to offer better error
messages. But if I forget a semicolon in this code:
import std.stdio;
void main() {
writeln("hello ")
/*
...
*/
// ...
writeln("world");
}
Using the -vcolumns dmd switch I receive this error message:
test.d(8,5): Error: found 'writeln' when expecting ';' following statement
In such cases I'd like the compiler to give an error message with line number
and column number closer to where the semicolon should go, to help me fix the
code faster:
test.d(3,21): Error: found 'writeln' when expecting ';' following statement
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list