// At this point, we know which function should correspond to this label,
// it is worth checking whether the function already associated with the label
// is the correct function,
if (label.function != null) {
if (!label.function.toErlangTerm().equals(origFunc.toErlangTerm()))
throw new IllegalArgumentException(
"label already has a function assigned and it is a different function, " + "was : "
+ label.function + ", now: " + origFunc);
}
return new ErlangLabel(origFunc, label.callName, label.input, label.expectedOutput);