Skip to content

This function expected 0 arguments, but got 0 #5395

Closed

Description

@cristianoc
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

Activity

  1. cknitt commented on Jun 29, 2022

    @cknitt
    Member

    @cristianoc I think this is resolved on master.

  2. cristianoc commented on Jun 29, 2022

    @cristianoc
    CollaboratorAuthor

    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?

  3. cristianoc commented on Jun 30, 2022

    @cristianoc
    CollaboratorAuthor

    Actually it's solved.

  4. added theissue type on Jul 19, 2025
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions