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: 3748 Reporter: administrator Status: closed (set by @mshinwell on 2016-12-06T21:13:09Z) Resolution: won't fix Priority: normal Severity: feature Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Henri
Version: 3.08.2
OS: linux
Submission from: aorleans-104-1-15-86.w80-11.abo.wanadoo.fr (80.11.35.86)
Equality is not defined for functional values, but, in the following code:
let _ =
let f x = x in
let g x = x in
exit (if f = g then 1 else 2)
The compiler should know that the type of f (and g) is arrow and should at least
issue a warning or even an error, instead of compiling silently and raising an
Invalid_argument at runtime.
The text was updated successfully, but these errors were encountered:
Original bug ID: 3748
Reporter: administrator
Status: closed (set by @mshinwell on 2016-12-06T21:13:09Z)
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Henri
Version: 3.08.2
OS: linux
Submission from: aorleans-104-1-15-86.w80-11.abo.wanadoo.fr (80.11.35.86)
Equality is not defined for functional values, but, in the following code:
let _ =
let f x = x in
let g x = x in
exit (if f = g then 1 else 2)
seamaster% ocamlopt -o test test.ml
seamaster% ./test
Fatal error: exception Invalid_argument("equal: functional value")
The compiler should know that the type of f (and g) is arrow and should at least
issue a warning or even an error, instead of compiling silently and raising an
Invalid_argument at runtime.
The text was updated successfully, but these errors were encountered: