Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007130OCamltypingpublic2016-01-28 01:212017-03-15 07:07
Reporterberke.durak 
Assigned Togarrigue 
PrioritylowSeverityminorReproducibilityalways
StatusresolvedResolutionno change required 
Platformx86_64OSLinuxOS VersionDebian (jessie)
Product Version4.02.2 
Target VersionlaterFixed in Version 
Summary0007130: Code may fail to type without -strict-sequence
DescriptionOne 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
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0017665)
garrigue (manager)
2017-03-15 07:07

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.

- Issue History
Date Modified Username Field Change
2016-01-28 01:21 berke.durak New Issue
2016-02-08 12:27 doligez Status new => acknowledged
2016-02-08 12:27 doligez Target Version => later
2017-02-23 16:45 doligez Category OCaml typing => typing
2017-03-15 07:07 garrigue Note Added: 0017665
2017-03-15 07:07 garrigue Status acknowledged => resolved
2017-03-15 07:07 garrigue Resolution open => no change required
2017-03-15 07:07 garrigue Assigned To => garrigue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker