#include <map>
#include "base/check.h"
-#include "expr/datatype.h"
#include "expr/dtype.h"
#include "expr/kind.h"
#include "options/datatypes_options.h"
}
else
{
- Assert(tn.toType().isRecord());
- const Record& record = DatatypeType(tn.toType()).getRecord();
- size = record.getNumFields();
- updateIndex = record.getIndex(
+ Assert(tn.isRecord());
+ const DTypeConstructor& recCons = dt[0];
+ size = recCons.getNumArgs();
+ // get the index for the name
+ updateIndex = recCons.getSelectorIndexForName(
n.getOperator().getConst<RecordUpdate>().getField());
}
Debug("tuprec") << "expr is " << n << std::endl;