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

Accessing the struct slot whose type is an alias to the function type causes an error #574

Open
bohonghuang opened this issue Mar 14, 2023 · 0 comments

Comments

@bohonghuang
Copy link

bohonghuang commented Mar 14, 2023

The minimal code to reproduce this issue:

(deftype callback () `(function () t))

(defstruct test-struct
  (callback1 (constantly nil) :type (function () t))
  (callback2 (constantly nil) :type callback))

(compile
 (defun abc ()
   (print (test-struct-callback1 (make-test-struct))) ; Success
   (print (test-struct-callback2 (make-test-struct))))) ; Error: FUNCTION types are not a legal argument to TYPEP: (FUNCTION NIL T)

(abc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant