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: 4458 Reporter: jm Assigned to:@garrigue Status: closed (set by @xavierleroy on 2010-04-29T12:26:04Z) Resolution: not a bug Priority: normal Severity: minor Version: 3.10+dev Category: ~DO NOT USE (was: OCaml general) Has duplicate:#4556
Bug description
% cat t.ml
type s = [`A]
type 'a t = { a : [> s ] as 'a }
% ocamlc -i t.ml
File "t.ml", line 2, characters 18-23:
Unbound type parameter ..
A work-around may be:
% cat tt.ml
type s = [A] type 'a t = { a : 'a } constraint 'a = [> s ] % ocamlc -i t.ml type s = [ A ]
type 'a t = { a : 'a; } constraint 'a = [> s ]
This is not a bug: in type definitions constraints must be introduced explictly through the "constraint" keyword.
This was already the case in 3.09.
The bug is rather that 3.10.0 allowed implicit introduction of constraints.
Sorry for the confusion this created.
Original bug ID: 4458
Reporter: jm
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2010-04-29T12:26:04Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Has duplicate: #4556
Bug description
% cat t.ml
type s = [`A]
type 'a t = { a : [> s ] as 'a }
% ocamlc -i t.ml
File "t.ml", line 2, characters 18-23:
Unbound type parameter ..
A work-around may be:
% cat tt.ml
type s = [
A] type 'a t = { a : 'a } constraint 'a = [> s ] % ocamlc -i t.ml type s = [
A ]type 'a t = { a : 'a; } constraint 'a = [> s ]
Additional information
AFAICS this bug appears with the fix for #4350.
The text was updated successfully, but these errors were encountered: