From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 24F61BC0A for ; Fri, 18 May 2007 20:50:22 +0200 (CEST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id l4IIoLwR017134 for ; Fri, 18 May 2007 20:50:21 +0200 Received: (qmail invoked by alias); 18 May 2007 18:50:21 -0000 Received: from Ybea3.y.pppool.de (EHLO hmmm.de) [89.60.190.163] by mail.gmx.net (mp032) with SMTP; 18 May 2007 20:50:21 +0200 X-Authenticated: #20477425 X-Provags-ID: V01U2FsdGVkX1+XzmF08LmX8io4CNYsoBcpjElQLPuJeHUrq/Q+Hb ZqIzTF92DJuKLB Date: Fri, 18 May 2007 20:50:20 +0200 From: micha To: caml-list@inria.fr Subject: virtual instance variables Message-ID: <20070518205020.59b45b61@hmmm.de> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Miltered: at concorde with ID 464DF56D.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; toplevel:01 val:01 val:01 ocaml:01 cheers:01 exception:01 behaviour:01 behaviour:01 inherit:01 inherit:01 int:01 define:01 compiling:02 variables:02 declaration:02 entering in the toplevel: class virtual c = object val virtual d : int end;; then: class d = object inherit c val d = 9 end;; gives me: Exception: Not_found. What is not found? (compiling works) if I define: class virtual c = object val d = 0 end;; class d = object inherit c val d = 9 end;; gives the warning: Warning V: the instance variable d is overriden. The behaviour changed in ocaml 3.10 (previous behaviour was hiding.) I thought that without the virtual declaration the behaviour is the same as before? cheers, Michael