Closed erights closed 1 year ago
- Preserve the tolerant behavior, but not pass the values of the extra args through to the protected raw behavior method. This would preserve the input validation intent of method guards while still accommodating API growth and thus version slippage. (suggested by @turadg )
I'm in favor of this approach as it's the one I had initially suggested as the behavior I'd expect.
Closing in favor of https://github.com/endojs/endo/pull/1765
Experiment re surprise that method guards with no declared rest by default accept extra args. This PR represents the most extreme and least compat "fix" to this surprise -- changing the semantics of
splitArray
andsplitRecord
so they also reject rest parts by default, i.e., if no rest argument is provided. Because of the way method guards delegate to splitArray, this takes care of the method guard "problem" as well.Other options: