Skip to content

This function expected 0 arguments, but got 0 #5395

Closed
@cristianoc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions