Subject: Re: bug#48133: 28.0.50; [native-comp] time-to-days throws wrong-number-of-arguments error

From: Ihor Radchenko <[email-masked]>
Date: Sun, 02 May 2021 15:43:49 +0800

Lars Ingebrigtsen <[email-masked]> writes:

> I'm just taking a stab in the dark here -- but it's really odd that it
> seems to say that the signature of `decode-time' is
>
> (&optional time)
>
> Is it possible that the test code is mocking/redefining `decode-time'
> with the wrong signature, or something along those lines?

Yes, it is the case. `decode-time' is redefined via `cl-letf' form in
`org-test-at-time' macro in org-test.el:

((symbol-function 'decode-time)
	     (lambda (&optional time) (funcall ,(symbol-function 'decode-time)
					       (or time ,at))))

Hope it helps.

Best,
Ihor