www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20024] New: "No property x for type Y" error not as helpful

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 puremagic.com
          Reporter: elpenguino+D 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.

--
Jul 03 2019