[Issue 9706] JSON output doesn't contain type of deduced values

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 12 14:29:29 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9706


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich at gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-03-12 14:29:28 PDT ---
Hmmm.. a quick hack is to try to infer the type before type is outputted:

void Declaration::jsonProperties(JsonOut *json)
{
    // ...

    if (!type)
    {
        VarDeclaration *vd = this->isVarDeclaration();
        type = vd->init->inferType(NULL);
    }

    json->property("type", "deco", type);

    // ...
}

But that's no good, scope is missing. Anyone more experienced knows how to
handle this?

-- 
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