Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

False positive error 5028 #69

@p-ouellette

Description

@p-ouellette

Environment

  • Millet version: ae4b2f4
  • Editor version: n/a
  • OS version: Fedora 39

Attestation

To avoid filing duplicate issues, I checked:

Steps to reproduce

Run Millet on the following code:

fun foo x =
  let val a = #a x
  in a
  end
and bar () = foo {a = true}

Expected behavior

No errors.

Actual behavior

MLton and SML/NJ accept the code, but Millet produces the following error:

error[5028]: cannot bind expansive polymorphic expression
  ┌─ /home/paul/src/millet/t.sml:2:15
  │
2 │   let val a = #a x
  │               ^^^^

I think Millet should know that #a x is not an expansive polymorphic expression because hovering over x shows { a : bool }.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions