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: 4623 Reporter: dario Assigned to:@garrigue Status: closed (set by @garrigue on 2010-04-27T07:16:51Z) Resolution: fixed Priority: normal Severity: minor Version: 3.11+dev Fixed in version: 3.11+dev Category: ~DO NOT USE (was: OCaml general) Related to:#4580
Bug description
Using the just released 3.11 Beta1, the following code is accepted by the top-level:
module Foobar:
sig
type foo_t = [ A ] type bar_t = [ B ]
type foobar_t = [ foo_t | bar_t ]
type 'a t = private 'a constraint 'a = [< foobar_t ]
val make_a: unit -> foo_t t
val make_b: unit -> bar_t t
end =
struct
type foo_t = [ A ] type bar_t = [ B ]
type foobar_t = [ foo_t | bar_t ]
type 'a t = 'a constraint 'a = [< foobar_t ]
let make_a () = `A
let make_b () = `B
end
But is rejected by both the byte and native code compilers:
File "constraint.ml", line 1, characters 0-1:
Error: The implementation constraint.ml
does not match the interface (inferred signature):
Modules do not match:
sig
type foo_t = [ A ] type bar_t = [ B ]
type foobar_t = [ A | B ]
type 'a t = 'a Foobar.t constraint 'a = [< foobar_t ]
val make_a : unit -> foo_t t
val make_b : unit -> bar_t t
end
is not included in
sig
type foo_t = [ A ] type bar_t = [ B ]
type foobar_t = [ A | B ]
type 'a t = private 'a constraint 'a = [< foobar_t ]
val make_a : unit -> foo_t t
val make_b : unit -> bar_t t
end
Type declarations do not match:
type 'a t = 'a Foobar.t constraint 'a = [< foobar_t ]
is not included in
type 'a t = private 'a constraint 'a = [< foobar_t ]
The text was updated successfully, but these errors were encountered:
Original bug ID: 4623
Reporter: dario
Assigned to: @garrigue
Status: closed (set by @garrigue on 2010-04-27T07:16:51Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11+dev
Fixed in version: 3.11+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #4580
Bug description
Using the just released 3.11 Beta1, the following code is accepted by the top-level:
module Foobar:
sig
type foo_t = [
A ] type bar_t = [
B ]type foobar_t = [ foo_t | bar_t ]
type 'a t = private 'a constraint 'a = [< foobar_t ]
end =
struct
type foo_t = [
A ] type bar_t = [
B ]type foobar_t = [ foo_t | bar_t ]
type 'a t = 'a constraint 'a = [< foobar_t ]
end
But is rejected by both the byte and native code compilers:
File "constraint.ml", line 1, characters 0-1:
Error: The implementation constraint.ml
does not match the interface (inferred signature):
Modules do not match:
sig
type foo_t = [
A ] type bar_t = [
B ]type foobar_t = [
A |
B ]type 'a t = 'a Foobar.t constraint 'a = [< foobar_t ]
val make_a : unit -> foo_t t
val make_b : unit -> bar_t t
end
is not included in
sig
type foo_t = [
A ] type bar_t = [
B ]type foobar_t = [
A |
B ]type 'a t = private 'a constraint 'a = [< foobar_t ]
val make_a : unit -> foo_t t
val make_b : unit -> bar_t t
end
Type declarations do not match:
type 'a t = 'a Foobar.t constraint 'a = [< foobar_t ]
is not included in
type 'a t = private 'a constraint 'a = [< foobar_t ]
The text was updated successfully, but these errors were encountered: