-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Assertion failure in type checker #5848
Copy link
Copy link
Closed
Labels
Description
Original bug ID: 5848
Reporter: waern
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2015-12-11T18:18:46Z)
Resolution: fixed
Priority: normal
Severity: major
Fixed in version: 4.01.0+dev
Category: typing
Child of: #5759 #5998
Bug description
Example:
module B : sig
type (_, _) t = Eq: ('a, 'a) t
val f: 'a -> 'b -> ('a, 'b) t
end
struct
type (_, _) t = Eq: ('a, 'a) t
let f t1 t2 = Obj.magic Eq
end
let of_type: type a. a -> a = fun x ->
match B.f x 4 with
| Eq -> 5
This produces the following error message when I try to compile:
File "test.mf", line 13, characters 4-6:
Warning 40: Eq is used out of scope.
Fatal error: exception Assert_failure("typing/env.ml", 811, 59)
Reactions are currently unavailable