--- Comment #4 from Andrej Mitrovic <> 2012-10-26 
12:39:14 PDT ---
(In reply to comment #3)
> I've been thinking.. maybe we could change the verrorPrint function to print 
> to
> a buffer by default, and then print that to stdout/stderr from the caller
> function when gagging is off, but store the error to the global struct if
> gagging is on. That way we can recover the previous error messages if 
> resolving
> UFCS failed.

Essentially the code would then look something like this:

Type *t1 = e1->type;
unsigned errors = global.startGagging();
e = t1->dotExp(sc, e1, ident);
OutBuffer oldErrors;  // new
if (global.endGagging(errors, &oldErrors))  // new
    e1->type = t1;              // kludge to restore type

    errors = global.startGagging();  // new
    e = resolveUFCSProperties(sc, this);
    if(global.endGagging(errors))  // new
        printErrors(&oldErrors);  // new
e = e->semantic(sc);
return e;

"&oldErrors" would be an optional parameter where current errors are stored, as
the old errors would be cleared on the call to endGagging.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to