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: 6496 Reporter: choeger Assigned to:@garrigue Status: closed (set by @xavierleroy on 2016-12-07T10:34:33Z) Resolution: duplicate Priority: normal Severity: major Platform: x86 OS: Linux OS Version: 3.15.4 Version: 4.01.0 Target version: 4.02.1+dev Category: typing Child of:#6505
Bug description
The following class type leads to a hard crash of the typechecker:
type 'r foo_t = <get : 'r bar option ; set : 'r bar option -> 'r; ..> as 'r
and 'r bar
constraint 'r = 'r foo_t
class c : object('r)
constraint 'r = 'r foo_t
method get : 'r bar option
method set : 'r bar option -> 'r
end = object(self: 'r)
constraint 'r = 'r foo_t
val _bar : 'r bar option = None
method get = _bar
method set b = {< _bar = b >}
end
Steps to reproduce
Either run ocamlc on the above interface:
ocamlc -o test.cmi test.mli
or #use the following implementation in a toplevel:
type 'r foo_t = <get : 'r bar option ; set : 'r bar option -> 'r; ..> as 'r
and 'r bar
constraint 'r = 'r foo_t
class c : object('r)
constraint 'r = 'r foo_t
method get : 'r bar option
method set : 'r bar option -> 'r
end = object(self: 'r)
constraint 'r = 'r foo_t
val _bar : 'r bar option = None
method get = _bar
method set b = {< _bar = b >}
end
Original bug ID: 6496
Reporter: choeger
Assigned to: @garrigue
Status: closed (set by @xavierleroy on 2016-12-07T10:34:33Z)
Resolution: duplicate
Priority: normal
Severity: major
Platform: x86
OS: Linux
OS Version: 3.15.4
Version: 4.01.0
Target version: 4.02.1+dev
Category: typing
Child of: #6505
Bug description
The following class type leads to a hard crash of the typechecker:
type 'r foo_t = <get : 'r bar option ; set : 'r bar option -> 'r; ..> as 'r
and 'r bar
constraint 'r = 'r foo_t
class c : object('r)
constraint 'r = 'r foo_t
method get : 'r bar option
method set : 'r bar option -> 'r
end = object(self: 'r)
constraint 'r = 'r foo_t
val _bar : 'r bar option = None
method get = _bar
method set b = {< _bar = b >}
end
Steps to reproduce
Either run ocamlc on the above interface:
ocamlc -o test.cmi test.mli
or #use the following implementation in a toplevel:
type 'r foo_t = <get : 'r bar option ; set : 'r bar option -> 'r; ..> as 'r
and 'r bar
constraint 'r = 'r foo_t
class c : object('r)
constraint 'r = 'r foo_t
method get : 'r bar option
method set : 'r bar option -> 'r
end = object(self: 'r)
constraint 'r = 'r foo_t
val _bar : 'r bar option = None
method get = _bar
method set b = {< _bar = b >}
end
Additional information
In any case, the crash is:
Fatal error: exception Assert_failure("typing/ctype.ml", 245, 27)
The text was updated successfully, but these errors were encountered: