| Anonymous | Login | Signup for a new account | 2013-05-20 23:57 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0005619 | OCaml | OCaml general | public | 2012-05-18 14:17 | 2012-05-25 07:22 | |||
| Reporter | lpw25 | |||||||
| Assigned To | garrigue | |||||||
| Priority | low | Severity | crash | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | 4.00.0+dev | ||||||
| Summary | 0005619: Uncuaght CType.Unify exception | |||||||
| Description | Compiling the following code produces an uncaught CType.Unify exception: exception Bad_cast class type foo_t = object method foo: string end type 'a name = Foo: foo_t name | Int: int name class foo: foo_t = object(self) method foo = "foo" method cast: type a. a name -> a = function Foo -> (self :> foo_t) | _ -> ((raise Bad_cast) : a) end I am using revision 12464 from the repository. I know that this code is not valid. The original code used my "open types" extension, but I had to remove those bits to show that the bug was not in my extension. The bug could be avoided in my original code by changing (self :> foo_t) to (self : #foo_t :> foo_t). | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0007462) garrigue (manager) 2012-05-25 07:22 |
Duplicating the environment for GADT pattern matching resulted in wrong detection of self-escape. Solved by not copying the argument to the dummy_method in subst.ml, under specific conditions. Fixed in trunk and 4.00, at revisions 12482 and 12483. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-05-18 14:17 | lpw25 | New Issue | |
| 2012-05-18 14:17 | lpw25 | File Added: cast.ml | |
| 2012-05-18 15:28 | gasche | Status | new => acknowledged |
| 2012-05-19 03:52 | garrigue | Assigned To | => garrigue |
| 2012-05-19 03:52 | garrigue | Status | acknowledged => assigned |
| 2012-05-25 07:22 | garrigue | Note Added: 0007462 | |
| 2012-05-25 07:22 | garrigue | Status | assigned => closed |
| 2012-05-25 07:22 | garrigue | Resolution | open => fixed |
| 2012-05-25 07:22 | garrigue | Fixed in Version | => 4.00.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |