Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003748OCamlOCaml generalpublic2005-08-05 21:062005-08-10 18:53
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003748: "equal: functional value" should issue a warning
DescriptionFull_Name: Henri
Version: 3.08.2
OS: linux
Submission from: (

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
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.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker