Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Changeset 780:2cf440d511bb

Show
Ignore:
Timestamp:
11/22/08 12:45:09 (2 months ago)
Author:
Christian Kamm <kamm incasoftware de>
branch:
default
Message:

Move tuple syntax copy for function arguments after semantic, to make sure
->ty contains the final value. Fixes run/t/tuple_20_A again.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dmd/mtype.c

    r772 r780  
    29522952        Type *t; 
    29532953 
    2954         // each function needs its own copy of a tuple arg, since 
    2955         // they mustn't share arg flags like inreg, ... 
    2956         if (arg->type->ty == Ttuple) 
    2957         arg->type = arg->type->syntaxCopy(); 
    2958  
    29592954        tf->inuse++; 
    29602955        arg->type = arg->type->semantic(loc,sc); 
    29612956        if (tf->inuse == 1) tf->inuse--; 
     2957 
     2958        // each function needs its own copy of a tuple arg, since 
     2959        // they mustn't share arg flags like inreg, ... 
     2960        if (arg->type->ty == Ttuple) { 
     2961        arg->type = arg->type->syntaxCopy(); 
     2962        tf->inuse++; 
     2963        arg->type = arg->type->semantic(loc,sc); 
     2964        if (tf->inuse == 1) tf->inuse--; 
     2965        } 
     2966 
    29622967        t = arg->type->toBasetype(); 
    29632968 
Copyright © 2008, LDC Development Team.