result = org.rascalmpl.interpreter.result.ResultFactory
.makeResult(rec.getType(), tuple, __eval.__getEval());
} else if (rec.getType().isRelation()
&& subscript.getType().isSubtypeOf(
rec.getType().getFieldType(0))) {
ISet rel = (ISet) rec.getValue();
IValue sub = subscript.getValue();
if (rec.getType().getArity() != 2) {
throw new UnsupportedSubscript(rec.getType(),
subscript.getType(), this);
}
if (!__eval.__getValue().getType().isSubtypeOf(
rec.getType().getFieldType(1))) {
throw new UnexpectedType(
rec.getType().getFieldType(1), __eval.__getValue()
.getType(), __eval.__getEval()
.getCurrentAST());
}
rel = rel.insert(__eval.__getEval().getValueFactory().tuple(
sub, __eval.__getValue().getValue()));
result = org.rascalmpl.interpreter.result.ResultFactory
.makeResult(rec.getType(), rel, __eval.__getEval());
} else {
throw new UnsupportedSubscript(rec.getType(), subscript