mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
45 lines
1.5 KiB
Text
45 lines
1.5 KiB
Text
Many error messages have changed
|
|
|
|
Some changes have been made without being associated to a reported issue:
|
|
|
|
Error messages for `@safe` violations now consistently mention they are related to `@safe` functions (or default functions with `-preview=safer`).
|
|
In general, function attributes that failed to infer have a more compact error message:
|
|
|
|
---
|
|
/*
|
|
BEFORE:
|
|
app.d(8): Error: function `attributediagnostic_nothrow.gc1` is not `nothrow`
|
|
app.d(2): which wasn't inferred `nothrow` because of:
|
|
app.d(2): `object.Exception` is thrown but not caught
|
|
|
|
AFTER:
|
|
app.d(8): Error: function `attributediagnostic_nothrow.gc1` is not `nothrow`
|
|
app.d(2): and `object.Exception` being thrown but not caught makes it fail to infer `nothrow`
|
|
*/
|
|
---
|
|
|
|
Match levels are now mentioned on ambiguous overloads: [#20637](https://github.com/dlang/dmd/pull/20637)
|
|
|
|
---
|
|
/*
|
|
BEFORE:
|
|
Error: `app.bar` called with argument types `(string)` matches both:
|
|
|
|
AFTER:
|
|
Error: `app.bar` called with argument types `(string)` matches multiple overloads after implicit conversions:
|
|
*/
|
|
---
|
|
|
|
When there's no operator overload found for a type, a new supplemental message points to the declaration.
|
|
|
|
---
|
|
/*
|
|
app.d(8): Error: no `[]` operator overload for type `U`
|
|
app.d(6): `app.U` declared here
|
|
*/
|
|
---
|
|
|
|
Furthermore:
|
|
|
|
- D1 operator overloading functions (`opAdd`, `opDot`) are completely removed and no longer mentioned in error messages specifically.
|
|
- Class allocators (`auto new() {}`) are not only a semantic error, but no longer being parsed
|