https://issues.dlang.org/show_bug.cgi?id=21852
Issue ID: 21852
Summary: diagnostic: One-liner errors with formatted Loc should
print context when -verrors=context
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
For example:
---
char skip()
{
goto Lskip;
char ch = '!';
Lskip:
return ch;
}
---
Reports:
---
mod.d(3): Error: goto skips declaration of variable mod.skip.ch at mod.d(4)
goto Lskip;
^
---
Whereas a better error that takes advantage of `-verrors=context' would be:
---
mod.d(3): Error: `goto` skips declaration of variable `mod.skip.ch`
goto Lskip;
^
mod.d(4): declared here
char ch = '!';
^
---
--