mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-04 22:13:14 +01:00
Merged DMD commit fb9df45c499e7e314642fc2de2ae6fd0ba1cfbbd:
-m This commit actually adds some more import hints.
This commit is contained in:
15
dmd/mtype.c
15
dmd/mtype.c
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user