caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Martin Jambon <martin.jambon@ens-lyon.org>
To: 沈胜宇 <syshen@nudt.edu.cn>, caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] if the initializer of a base class can be inherited to subclass?
Date: Tue, 22 Dec 2015 10:50:59 -0800	[thread overview]
Message-ID: <56799B93.8090306@ens-lyon.org> (raw)
In-Reply-To: <60abe06e.e1.151ca4e8126.Coremail.syshen@nudt.edu.cn>

On 12/22/2015 07:28 AM, 沈胜宇 wrote:
> if the initializer of a base class can be inherited to subclass?
>
> It seems it dont. But I think it should

It works for me:

# class a = object initializer print_endline "Hello" end;;
class a : object  end
# class b = object inherit a end;;
class b : object  end
# new a;;
Hello
- : a = <obj>
# new b;;
Hello
- : b = <obj>
#

      reply	other threads:[~2015-12-22 18:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 15:28 沈胜宇
2015-12-22 18:50 ` Martin Jambon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56799B93.8090306@ens-lyon.org \
    --to=martin.jambon@ens-lyon.org \
    --cc=caml-list@inria.fr \
    --cc=syshen@nudt.edu.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).