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

This function expected 0 arguments, but got 0 #5395

Closed
cristianoc opened this issue May 31, 2022 · 3 comments
Closed

This function expected 0 arguments, but got 0 #5395

cristianoc opened this issue May 31, 2022 · 3 comments
Labels

Comments

@cristianoc
Copy link
Collaborator

let _ = if true {
  (. ()) => {
    let f = (. ()) => 3
    f
  }
} else {
  (. ()) => {
    let f = (. ()) => ""
    f
  }
}

Error reported:


  We've found a bug for you!
  /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/tests/src/Hover.res:137:5

  135 │   (. ()) => {
  136 │     let f = (. ()) => ""
  137 │     f
  138 │   }
  139 │ }

  This function expected 0 arguments, but got 0

See playground: https://rescript-lang.org/try?code=DYUwLgBA+hC8EEsBmEwCcCuIIG8BQEEAFAHTECU5cAfLgYRKJCvKRVbLQMz2FL0BfPAIghgAZ2z5CbIpRp0GjcBBbEycjrQBE23qsHCgA

@cknitt
Copy link
Member

cknitt commented Jun 29, 2022

@cristianoc I think this is resolved on master.

@cristianoc
Copy link
Collaborator Author

Not sure actually. The printer prints better type, but this seems different.
Unless I forgot some other fix. There have been a lot recently.
Can you try?

@cristianoc
Copy link
Collaborator Author

Actually it's solved.

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