Skip to content
New issue

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

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

Already on GitHub? # to your account

Unintuitive recursive type error in simple code #121

Open
davazp opened this issue Mar 28, 2020 · 0 comments
Open

Unintuitive recursive type error in simple code #121

davazp opened this issue Mar 28, 2020 · 0 comments

Comments

@davazp
Copy link
Member

davazp commented Mar 28, 2020

The following code fails to type

(lambda () ((:callback *context*) 10))

It infers that the context has to have a :callback field of type function:

{
  :callback (-> .... number a)
}

but what's the full type of that function? the function is called in the same context itself, so the inferred type for the code would be a recursive context.

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

No branches or pull requests

1 participant