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: 1365 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Again, this is a bug report from tim freeman, but in this case, altough
i reproduced this, i don't know enough to be ableto tell if the
diagnosis was correct or not.
Put this text into a file and compile it with ocamlc:
class type ['a] eventdesc =
object
end
type 'a described_event = {ddesc: 'a eventdesc}
class type interntable = object
method unintern: string eventdesc
end
let eventdesctable: interntable = failwith "ouch"
class log_searcher =
object
method x: 'a . 'a described_event = {ddesc = eventdesctable#unintern}
end
You'll get an error like
File "foo.ml", line 15, characters 38-71:
This method has type 'a described_event which is less general than
'b. 'b described_event
This error message is bad; the problem is actually that the method has
type string described_event. If the type were simply
'a described_event for all 'a, then the type would not be less general
than the intended type.
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux lobus.fungible.com 2.4.17 #6 Sun Mar 31 13:05:51 PST 2002 i686
Locale: LANG=C, LC_CTYPE=C
Versions of packages ocaml depends on:
ii libc6 2.2.5-14 GNU C Library: Shared libraries an
ii libncurses5-dev 5.2.20020112a-7 Developer's libraries and docs for
ii ocaml-base 3.06-1 Runtime system for ocaml bytecode
ii ocaml-base [ocaml-base-3 3.06-1 Runtime system for ocaml bytecode
pn ocaml-base-3.06 Not found.
----- End forwarded message -----
The text was updated successfully, but these errors were encountered:
Original bug ID: 1365
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Again, this is a bug report from tim freeman, but in this case, altough
i reproduced this, i don't know enough to be ableto tell if the
diagnosis was correct or not.
Friendly,
Sven Luther
----- Forwarded message from Tim Freeman tim@fungible.com -----
Envelope-to: luther@localhost
Delivery-date: Tue, 03 Sep 2002 07:18:18 +0200
Subject: Bug#159393: ocaml: Misleading error message when compiling with first-class polymorphism
Reply-To: Tim Freeman tim@fungible.com, 159393@bugs.debian.org
Resent-From: Tim Freeman tim@fungible.com
Resent-To: debian-bugs-dist@lists.debian.org
Resent-CC: Sven Luther luther@debian.org, ocaml@packages.qa.debian.org
Resent-Date: Tue, 03 Sep 2002 01:33:02 GMT
Resent-Message-ID: handler.159393.B.103101601732490@bugs.debian.org
X-Debian-PR-Message: report 159393
X-Debian-PR-Package: ocaml
X-Debian-PR-Keywords:
From: Tim Freeman tim@fungible.com
To: Debian Bug Tracking System submit@bugs.debian.org
Resent-Sender: Debian BTS debbugs@master.debian.org
X-Antivirus: scanned by sophos at isis.u-strasbg.fr
X-Spam-Status: No, hits=-4.5 required=5.0 tests=SENT_BY_BTS,FORGED_RCVD_FOUND version=2.20
X-Spam-Level:
Package: ocaml
Version: 3.06-1
Severity: normal
Put this text into a file and compile it with ocamlc:
class type ['a] eventdesc =
object
end
type 'a described_event = {ddesc: 'a eventdesc}
class type interntable = object
method unintern: string eventdesc
end
let eventdesctable: interntable = failwith "ouch"
class log_searcher =
object
method x: 'a . 'a described_event = {ddesc = eventdesctable#unintern}
end
You'll get an error like
File "foo.ml", line 15, characters 38-71:
This method has type 'a described_event which is less general than
'b. 'b described_event
This error message is bad; the problem is actually that the method has
type string described_event. If the type were simply
'a described_event for all 'a, then the type would not be less general
than the intended type.
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux lobus.fungible.com 2.4.17 #6 Sun Mar 31 13:05:51 PST 2002 i686
Locale: LANG=C, LC_CTYPE=C
Versions of packages ocaml depends on:
ii libc6 2.2.5-14 GNU C Library: Shared libraries an
ii libncurses5-dev 5.2.20020112a-7 Developer's libraries and docs for
ii ocaml-base 3.06-1 Runtime system for ocaml bytecode
ii ocaml-base [ocaml-base-3 3.06-1 Runtime system for ocaml bytecode
pn ocaml-base-3.06 Not found.
----- End forwarded message -----
The text was updated successfully, but these errors were encountered: