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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 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: -------