You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 8, 2023. It is now read-only.
This repository was archived by the owner on Jul 8, 2023. It is now read-only.
Allow ad hoc mock method implementations to specify whether the function signature from an overridden method should be used when generating the mock class #267
A "standard" ad hoc mock like the following one would result in a mock class with someMethod having the signature (string|int): string (matching the signature of the ad hoc implementation):
Whereas a special token like {useOriginalSignature} would change the behaviour and result in a mock class with someMethod having the signature (string): string|int (matching the signature of the original method):
Alternatively, perhaps the behaviour could be flipped, defaulting to using the overridden method's signature, and a keyword like override (inspired by languages that require explicit override declaration) could indicate that the signature of the ad hoc implementation should be used. This would be a BC break, however.