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: 7706 Reporter:@lpw25 Assigned to:@gasche Status: resolved (set by @gasche on 2018-04-10T10:35:19Z) Resolution: fixed Priority: normal Severity: minor Version: 4.06.0 Fixed in version: 4.07.0+dev/beta2/rc1/rc2 Category: typing Related to:#7768 Monitored by:@nojb@yallop
Bug description
The new recursive value check is too relaxed in how it treats [let] when it decides if a recursive definition's size can be calculated in advance:
OCaml version 4.06.0+beta1
# let rec x =
let y = if false then (fun z -> 1) else (fun z -> x 4 + 1) in
y;;
val x : int -> int = <fun>
# x 42;;
Process ocaml-toplevel segmentation fault
The text was updated successfully, but these errors were encountered:
The problem is that identifiers are considered to be static size; in your example, "y" is considered static-sized, so the definition is accepted. This is clearly wrong for local identifiers, but it is not clear to me why it should be correct for non-local identifiers (or for identifiers defined in the same letrec-block).
Original bug ID: 7706
Reporter: @lpw25
Assigned to: @gasche
Status: resolved (set by @gasche on 2018-04-10T10:35:19Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.06.0
Fixed in version: 4.07.0+dev/beta2/rc1/rc2
Category: typing
Related to: #7768
Monitored by: @nojb @yallop
Bug description
The new recursive value check is too relaxed in how it treats [let] when it decides if a recursive definition's size can be calculated in advance:
The text was updated successfully, but these errors were encountered: