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

Invalid number type: (FLOAT 0) #1586

Open
paulapatience opened this issue May 16, 2024 · 1 comment
Open

Invalid number type: (FLOAT 0) #1586

paulapatience opened this issue May 16, 2024 · 1 comment
Labels

Comments

@paulapatience
Copy link
Contributor

Compiling

(etypecase 0
  (integer)
  ((float 0)))

results in

;   WARNING during compiler-macro-expansion:
;     Invalid number type: (FLOAT 0)
;     at /tmp/foo.lisp 3:3
@Bike
Copy link
Member

Bike commented May 17, 2024

I think this is not strictly a bug: see CLHS 12.1.6 Interval Designators. The designators for an interval of the given type have to be numbers of that type, and 0 is not a float.

I'm going to leave this open because arguably we should be nice and coerce it for you.

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

No branches or pull requests

2 participants