Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTYPE declaration for a function that returns multiple values leads to an early return on the caller side #540

Open
bohonghuang opened this issue Jan 5, 2023 · 0 comments

Comments

@bohonghuang
Copy link

The following is the code where this issue can occur:

(declaim (ftype (function () fixnum) test-values))
(defun test-values ()
  (values 1 2))

(defun foo ()
  (1- (test-values)))

(foo) ; => 1, 2

It seems that ABCL treats the return type fixnum as (values fixnum) despite the slight differences between them, because when I changed it to (values fixnum fixnum), the code worked as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant