You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7130 Reporter: berke.durak Assigned to:@garrigue Status: resolved (set by @garrigue on 2017-03-15T06:07:41Z) Resolution: not a bug Priority: low Severity: minor Platform: x86_64 OS: Linux OS Version: Debian (jessie) Version: 4.02.2 Target version: later Category: typing
Bug description
One generally expects that if code compiles with stricter options, it will also compile with more lax options, but this is not the case with -strict-sequence.
Steps to reproduce
% ocaml
OCaml version 4.02.2
class bar = object method foo f = f (); 123 end;;
Error: Some type variables are unbound in this type:
class bar : object method foo : (unit -> 'a) -> int end
The method foo has type (unit -> 'a) -> int where 'a is unbound
% ocaml -strict-sequence
OCaml version 4.02.2
class bar = object method foo f = f (); 123 end;;
class bar : object method foo : (unit -> unit) -> int end
The text was updated successfully, but these errors were encountered:
Type inference for type classes is not principal.
In particular, it may be necessary to restrict some types for a program to be accepted.
So this situation is no surprise.
Original bug ID: 7130
Reporter: berke.durak
Assigned to: @garrigue
Status: resolved (set by @garrigue on 2017-03-15T06:07:41Z)
Resolution: not a bug
Priority: low
Severity: minor
Platform: x86_64
OS: Linux
OS Version: Debian (jessie)
Version: 4.02.2
Target version: later
Category: typing
Bug description
One generally expects that if code compiles with stricter options, it will also compile with more lax options, but this is not the case with -strict-sequence.
Steps to reproduce
% ocaml
OCaml version 4.02.2
class bar = object method foo f = f (); 123 end;;
Error: Some type variables are unbound in this type:
class bar : object method foo : (unit -> 'a) -> int end
The method foo has type (unit -> 'a) -> int where 'a is unbound
% ocaml -strict-sequence
OCaml version 4.02.2
class bar = object method foo f = f (); 123 end;;
class bar : object method foo : (unit -> unit) -> int end
The text was updated successfully, but these errors were encountered: