Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/TupleExpr.cc

    rea6332d r5ccb10d  
    1414//
    1515
    16 #include <cassert>              // for assert, safe_dynamic_cast, assertf
    17 #include <iterator>             // for next
    18 #include <list>                 // for list, _List_iterator
    19 #include <ostream>              // for ostream, operator<<, basic_ostream, endl
    20 #include <string>               // for operator<<, string, char_traits
    21 
    22 #include "Common/utility.h"     // for cloneAll, deleteAll, printAll, toString
    23 #include "Declaration.h"        // for ObjectDecl
    24 #include "Expression.h"         // for Expression, TupleExpr, TupleIndexExpr
    25 #include "SynTree/Label.h"      // for Label, noLabels
    26 #include "SynTree/Statement.h"  // for CompoundStmt, DeclStmt, ExprStmt, Sta...
    27 #include "Tuples/Tuples.h"      // for makeTupleType
    28 #include "Type.h"               // for TupleType, Type
     16#include "Expression.h"
     17#include "Common/utility.h"
     18#include "Type.h"
     19#include "Declaration.h"
     20#include "Tuples/Tuples.h"
     21#include "VarExprReplacer.h"
    2922
    3023UntypedTupleExpr::UntypedTupleExpr( const std::list< Expression * > & exprs, Expression *_aname ) : Expression( _aname ), exprs( exprs ) {
     
    6760        assertf( type->size() > index, "TupleIndexExpr index out of bounds: tuple size %d, requested index %d in expr %s", type->size(), index, toString( tuple ).c_str() );
    6861        set_result( (*std::next( type->get_types().begin(), index ))->clone() );
    69         get_result()->set_lvalue( type->get_lvalue() );
     62        // like MemberExpr, TupleIndexExpr is always an lvalue
     63        get_result()->set_lvalue( true );
    7064}
    7165
Note: See TracChangeset for help on using the changeset viewer.