Merged DMD commit fb9df45c499e7e314642fc2de2ae6fd0ba1cfbbd:

-m

This commit actually adds some more import hints.
This commit is contained in:
David Nadlinger
2011-04-22 18:41:16 +02:00
parent da06f7c4e3
commit 1ae87178ba

View File

@@ -3651,9 +3651,22 @@ L1:
else
*pt = t->merge();
}
if (!s)
{
error(loc, "identifier '%s' is not defined", toChars());
const char *p = toChars();
const char *n = importHint(p);
if (n)
error(loc, "'%s' is not defined, perhaps you need to import %s; ?", p, n);
else
{
Identifier *id = new Identifier(p, TOKidentifier);
s = sc->search_correct(id);
if (s)
error(loc, "undefined identifier %s, did you mean %s %s?", p, s->kind(), s->toChars());
else
error(loc, "undefined identifier %s", p);
}
}
}