D-Programming-Language/dmd — pull request #1274 by AndrejMitrovic (2012-11-09 11:35:55+00:00)
Title: Issue 8894: Regression: 2.059: Lookup error message has become uninformative

http://d.puremagic.com/issues/show_bug.cgi?id=8894

The state of things as they were since 2.059:

Before attempteding a UFCS lookup a property lookup is first attempted while errors are gagged. The gagging allows UFCS to find a suitable match if property lookup fails. But if no match exists during UFCS lookup the user gets back an uninformative error message, e.g.:

```d
module test;
struct Foo { }

void main()
{
Foo f;
auto x = f.x;
}
```

```
test.d(6): Error: undefined identifier 'x'
```

As a workaround now UFCS errors are also gagged, and if any errors occur we re-run the property lookup again, only this time without error gagging. This restores the 2.058 error message:

```
test.d(6): Error: no property 'x' for type 'Foo'
```