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

Type inference fails on function parameters that aren't used. #122

Open
eholk opened this issue Jan 22, 2014 · 0 comments
Open

Type inference fails on function parameters that aren't used. #122

eholk opened this issue Jan 22, 2014 · 0 comments
Labels

Comments

@eholk
Copy link
Owner

eholk commented Jan 22, 2014

A program like this one doesn't pass type inference:

(module
  (define (main)
    (foo 5)))

(define (foo x)
  (println 5)))

The type inferencer tries to type foo in isolation, but it has no information about x since x is never used. Yet, since foo is called, it should be able to infer from the use-site that x should have type int.

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

1 participant