Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying interface with type parameter on module without type parameter #11610

Closed
rand00 opened this issue Oct 6, 2022 · 2 comments
Closed

Comments

@rand00
Copy link

rand00 commented Oct 6, 2022

Compiling the following with ocamlbuild bug.byte prints:

+ ocamlfind ocamlc -c -o bug.cmo bug.ml
Fatal error: exception Invalid_argument("List.iter2")
Command exited with code 2.
Compilation unsuccessful after building 2 targets (0 cached) in 00:00:00.
module type S = sig

  type 'a error = unit
  val get : unit -> _ error

end

module M : S = struct

  (* type 'a error = unit (\*< correct type*\)*)
  type error = unit
  let get () = failwith "not implemented"

end

.. and there is no error reported by Merlin in the code either

@Octachron
Copy link
Member

This a 4.13 only bug (see #10836) that has been fixed in 4.14 (see #10952).

@Octachron
Copy link
Member

I forgot on the spur of the moment: thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants