if(!repl.getType().isString()){
throw new UnexpectedType(rec.getType(), repl.getType(), __eval.__getEval().getCurrentAST());
}
__eval.__setValue(__eval.newResult(str, __eval.__getValue()));
str = str.replace(firstIndex, secondIndex, endIndex, (IString) repl);
result = org.rascalmpl.interpreter.result.ResultFactory
.makeResult(rec.hasInferredType() ? rec.getType()
.lub(str.getType()) : rec.getType(), str,
__eval.__getEval());