mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 13:40:11 +03:00
Also make deprecationSupplemental adhere to error limit (#16779)
Co-authored-by: Dennis Korpel <dennis@sarc.nl>
This commit is contained in:
parent
29a34181da
commit
e643a07ebc
2 changed files with 6 additions and 3 deletions
|
@ -566,10 +566,13 @@ extern (C++) void verrorReportSupplemental(const ref Loc loc, const(char)* forma
|
||||||
if (global.params.useDeprecated == DiagnosticReporting.error)
|
if (global.params.useDeprecated == DiagnosticReporting.error)
|
||||||
goto case ErrorKind.error;
|
goto case ErrorKind.error;
|
||||||
else if (global.params.useDeprecated == DiagnosticReporting.inform && !global.gag)
|
else if (global.params.useDeprecated == DiagnosticReporting.inform && !global.gag)
|
||||||
|
{
|
||||||
|
if (global.params.v.errorLimit == 0 || global.deprecations <= global.params.v.errorLimit)
|
||||||
{
|
{
|
||||||
info.headerColor = Classification.deprecation;
|
info.headerColor = Classification.deprecation;
|
||||||
verrorPrint(format, ap, info);
|
verrorPrint(format, ap, info);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ErrorKind.warning:
|
case ErrorKind.warning:
|
||||||
|
|
|
@ -18,5 +18,5 @@ void main()
|
||||||
f();
|
f();
|
||||||
f();
|
f();
|
||||||
f();
|
f();
|
||||||
f();
|
static assert("1"); // also surpress deprecationSupplemental
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue