[Issue 8894] 2.059: Lookup error message has become uninformative
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 25 16:24:26 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8894
--- Comment #2 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-10-25 16:24:25 PDT ---
(In reply to comment #1)
> It seems errors are gagged at this point in "Expression *Type::getProperty(Loc
> loc, Identifier *ident)" in file mtype.c:
The gagging starts in `DotIdExp::semantic(Scope *sc, int flag)` with a nice
comment:
/* This would be much better if we added a "hasProperty" method to types,
* i.e. the gagging is a bad way.
*/
// ..
Type *t1 = e1->type;
unsigned errors = global.startGagging();
e = t1->dotExp(sc, e1, ident);
if (global.endGagging(errors)) // if failed to find the property
{
e1->type = t1; // kludge to restore type
e = resolveUFCSProperties(sc, this);
}
e = e->semantic(sc);
return e;
So it seems UFCS really is to blame. Type properties are checked first, then
UFCS is checked, however if neither of them have a match then we should print
out the property error rather than the UFCS error.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list