From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 51F7A7F6BB for ; Thu, 5 Dec 2013 16:13:44 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=pra; client-ip=212.227.15.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=mailfrom; client-ip=212.227.15.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.web.de) identity=helo; client-ip=212.227.15.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="postmaster@mout.web.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtIBABaXoFLU4w8DnGdsb2JhbABZtzCFT4EbFg4BAQEBAQYNCQkUKIIlAQEFOj8QCw4KCSUPBSghiAIBFrl1H4dTF48AB4MggRMDmBOGLxKOfQ X-IPAS-Result: AtIBABaXoFLU4w8DnGdsb2JhbABZtzCFT4EbFg4BAQEBAQYNCQkUKIIlAQEFOj8QCw4KCSUPBSghiAIBFrl1H4dTF48AB4MggRMDmBOGLxKOfQ X-IronPort-AV: E=Sophos;i="4.93,833,1378850400"; d="scan'208";a="47160184" Received: from mout.web.de ([212.227.15.3]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 05 Dec 2013 16:13:44 +0100 Received: from frosties.localnet ([37.49.32.119]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0LnVr4-1VNU8v0Gkw-00hhM6 for ; Thu, 05 Dec 2013 16:13:43 +0100 Received: from mrvn by frosties.localnet with local (Exim 4.80) (envelope-from ) id 1VoacY-0003Jv-IJ; Thu, 05 Dec 2013 16:13:42 +0100 Date: Thu, 5 Dec 2013 16:13:42 +0100 From: Goswin von Brederlow To: Dmitri Boulytchev Cc: caml-list Message-ID: <20131205151342.GA12720@frosties> References: <529BAB43.3080105@gmail.com> <20131202144100.GA24602@frosties> <529CA1C9.2050203@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <529CA1C9.2050203@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V03:K0:7qAvZTRRxHhpjHTj8QcYn0F6Uy40AvMuQ0NKF5e6oz1O2NwAUDa XkU30Q5u1ZwkrGc1eJp9izFzbLBPlH3iWeBhuNSqlxESsEoyQijNZ9AH6MXW+zaIJ62/6ba n/Dasd3evFOq0W+sXHlaqitc3sClYPl/j/4LA9QOzxCmLxmpsMZUHIdD0lastD0lMceEM0r 8qnfqcEfJ9NA6CTw3YWIw== Subject: Re: [Caml-list] Confusing behaviour of type inference for polymorphic classes. On Mon, Dec 02, 2013 at 07:05:45PM +0400, Dmitri Boulytchev wrote: > >I think this is caused by the recursion. The type inference assumes > >that the recursive call will have the same type as the parent. Since > >you switch 'a and 'b in the recursive call the compiler inferes that > >'a == 'b. > > > I don't think we have a recursive call here since we call > a method from *another* object. > > BR, > DB Different instance but same class and method. The type system is a bit odd with objects sometimes. MfG Goswin