mllg / checkmate

Fast and versatile argument checks
https://mllg.github.io/checkmate/
Other
265 stars 30 forks source link

assertFunction / checkFunction does not check multiple arguments #233

Closed chris-mcdo closed 1 year ago

chris-mcdo commented 2 years ago

Say I want to check a function has two arguments, a and b:

multiply <- function(a, b) a * b

As far as I can tell, the current behaviour is:

Am I missing something? Or is it currently not possible to check whether a function has specific arguments?

Thanks

mllg commented 1 year ago

Sorry, I cannot reproduce this issue. On my system, the last line also fails. Please try reinstalling and run the example in a new session. If the problem persists, please reopen.