[Issue 20024] New: "No property x for type Y" error not as helpful as it should be
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 3 18:27:13 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20024
Issue ID: 20024
Summary: "No property x for type Y" error not as helpful as it
should be
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: elpenguino+D at gmail.com
```
auto x = ["a","b","c"];
auto y = x.joiner();
```
Given code like this, the compiler will issue a `Error: No property joiner for
type string[]` error. Changing the second line to `joiner(x)` will give a more
useful `Error: joiner is not defined, perhaps import std.algorithm; is
needed?`.
The former error message should be made to be more like the latter. It should
address the possibility of UFCS and suggest the same import.
--
More information about the Digitalmars-d-bugs
mailing list