return
,
modifies the last expression if it is not an explicit call to return,
and adds an initial command to compute check the arguments in the cal
via checkArgs
.
rewriteTypeCheck(f, doReturn = TRUE, checkArgs = TRUE, addInvisible = FALSE)
FALSE
,
the modifications are greatly simplified and no additions are made
to handle the validation of the return value. This is used when the
type information provides no information about the return type
and so it cannot be validated or constrained.invisible
.typeInfo
checkArgs
checkReturnValue
f = function(x, y) {
z = x + y
sum(z)
}
Run the code above in your browser using DataLab