* Require that __overrides is defined as a non-recursive attribute

(which means it can only be defined via "inherit"), otherwise we get
  scoping bugs, since __overrides can't be recursive (or at least, it
  would be hard).
This commit is contained in:
Eelco Dolstra 2008-08-26 14:05:59 +00:00
parent d06be428f6
commit 99dc3e613a

View File

@ -181,11 +181,11 @@ LocalNoInline(ATerm expandRec(EvalState & state, ATerm e, ATermList rbnds, ATerm
ATermMap subs(ATgetLength(rbnds) + ATgetLength(nrbnds)); ATermMap subs(ATgetLength(rbnds) + ATgetLength(nrbnds));
for (ATermIterator i(rbnds); i; ++i) { for (ATermIterator i(rbnds); i; ++i) {
if (!matchBind(*i, name, e2, pos)) abort(); /* can't happen */ if (!matchBind(*i, name, e2, pos)) abort(); /* can't happen */
if (name == sOverrides) eOverrides = e2;
subs.set(name, makeSelect(e, name)); subs.set(name, makeSelect(e, name));
} }
for (ATermIterator i(nrbnds); i; ++i) { for (ATermIterator i(nrbnds); i; ++i) {
if (!matchBind(*i, name, e2, pos)) abort(); /* can't happen */ if (!matchBind(*i, name, e2, pos)) abort(); /* can't happen */
if (name == sOverrides) eOverrides = e2;
subs.set(name, e2); subs.set(name, e2);
} }