| Anonymous | Login | Signup for a new account | 2013-05-24 10:56 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 | |||
| 0000163 | OCaml | OCaml general | public | 2000-07-21 10:55 | 2000-07-27 14:41 | |||
| Reporter | administrator | |||||||
| Assigned To | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0000163: interaction classes / foncteurs | |||||||
| Description | Je suis tombé sur un comportement bizarre du typeur d'OCaml 3.00+7 lorsqu'on mélange classes et foncteurs: # module A = struct class c = object method m = 1 end end;; module A : sig class c : object method m : int end end # (new A.c)#m;; - : int = 1 (* Jusqu'ici, tout va bien. Maintenant, ajoutons un foncteur. *) # module F(X: sig class c : object method m : int end end) = struct class d = object (self) inherit X.c method n = 1 + self#m end end;; module F : functor (X : sig class c : object method m : int end end) -> sig class d : object method m : int method n : int end end # module B = F(A);; module B : sig class d : object method m : int method n : int end end (* Ça va bien aussi. Mais: *) # (new B.d)#n;; This expression has type d It has no method n (* Allo? Mais quel est le type de (new B.d) ? *) # new B.d;; - : d = <abstr> (* Ce "d" me semble fortement libre! *) Ce que je ne comprends pas, c'est pourquoi le "recalage" de c en A.c marche pour A, alors que d n'est pas "recalé" en B.d. - Xavier | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0000421) administrator (administrator) 2000-07-27 14:41 |
Bug introduced 2000-05-16, fixed 2000-07-27 by Xavier (problem in typing/subst.ml) |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| Copyright © 2000 - 2011 MantisBT Group |