Skip to content

Unintuitive recursive type error in simple code #121

Description

@davazp

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions