Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 630

Show
Ignore:
Timestamp:
08/27/10 05:52:21 (14 years ago)
Author:
walter
Message:

bugzilla 3935 - opBinary is instantiated with '='

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/opover.c

    r488 r630  
    457457 
    458458    AggregateDeclaration *ad1 = isAggregate(e1->type); 
    459459    AggregateDeclaration *ad2 = isAggregate(e2->type); 
    460460 
    461461    Dsymbol *s = NULL; 
    462462    Dsymbol *s_r = NULL; 
    463463 
    464464#if 1 // the old D1 scheme 
    465465    if (ad1 && id) 
    466466    { 
    467467        s = search_function(ad1, id); 
    468468    } 
    469469    if (ad2 && id_r) 
    470470    { 
    471471        s_r = search_function(ad2, id_r); 
    472472    } 
    473473#endif 
    474474 
    475475    Objects *targsi = NULL; 
    476476#if DMDV2 
    477     if (!s && !s_r && op != TOKequal && op != TOKnotequal
     477    if (!s && !s_r && op != TOKequal && op != TOKnotequal && op != TOKassign
    478478    {   /* Try the new D2 scheme, opBinary and opBinaryRight 
    479479         */ 
    480480        if (ad1) 
    481481            s = search_function(ad1, Id::opBinary); 
    482482        if (ad2) 
    483483            s_r = search_function(ad2, Id::opBinaryRight); 
    484484 
    485485        // Set targsi, the template argument list, which will be the operator string 
    486486        if (s || s_r) 
    487487        { 
    488488            id = Id::opBinary; 
    489489            id_r = Id::opBinaryRight; 
    490490            targsi = opToArg(sc, op); 
    491491        } 
    492492    } 
    493493#endif 
    494494 
    495495    if (s || s_r) 
    496496    { 
    497497        /* Try: