Skip to content

Signature / structure type mismatch location #57

Description

@vqns

Environment

Steps to reproduce

Structure / signature type mismatch for a given identifier seems to be reported at the start of the structure (i.e at the struct keyword) and only mentions incompatible types (5006). Example:

structure S :
sig
    val i : int
end =
struct
(* ^ error here *)
    val i = ""
end

Expected behavior

If possible, the location of the diagnostic should be that of the declaration in the structure. Or maybe mentioning either the identifier or the positions of the mismatching declarations in the diagnostic message?

Actual behavior

incompatible types: `int` and `string` are different type constructors
  expected `int`
    found `string` Millet(5006)

Activity

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions