Skip to content

Further improvement to interface/implementation type mismatch errors #7574

@vicuna

Description

@vicuna

Original bug ID: 7574
Reporter: @dbuenzli
Status: confirmed (set by @Octachron on 2017-07-11T19:42:39Z)
Resolution: open
Priority: normal
Severity: feature
Category: typing
Child of: #7338
Monitored by: @dbuenzli

Bug description

While #6311 did already bring some improvements. Implementation/Interface mismatch error could still be greatly improved.

  1. Allow to jump to the corresponding location in mli file aswell (though I'm not sure the cmi file has the info).
  2. Provide better hints at where the mismatch occurs, i.e. we want some kind of diff function on types. This is useful both for big and small types.

Here's a very simple example that may seem obvious out of context but I had to stare it intensely to catch the typo:

   Values do not match:
     val enum : ?dovc:'a -> 'b -> 'c
   is not included in
     val enum : ?docv:string -> (string * 'a) list -> 'a t

Related to #7338

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions