caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Optional arguments in inherited methods
@ 2004-04-28 16:13 John Goerzen
  2004-04-28 16:56 ` james woodyatt
  0 siblings, 1 reply; 6+ messages in thread
From: John Goerzen @ 2004-04-28 16:13 UTC (permalink / raw)
  To: caml-list

Hello,

I have this defined in a base class:

    method private getdata sname oname =  <code here>

In my subclass, I wish to do this:

    method private getdata ?(raw=false) ?(idepth=10) ?extravars sname oname = <code>

The compiler does not seem to like this at all, though I am at a loss to
explain why.  Can someone help me out?

The error I get is:

The method getdata has type
  ?raw:'a -> ?idepth:'b -> ?extravars:'c -> 'd -> 'e -> 'f
  but is expected to have type string -> string -> string

So even stranger is that it doesn't set a type for anything, even though
it has enough information to figure out the type for everything.

Hints?

-- John

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-04-29  8:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-28 16:13 [Caml-list] Optional arguments in inherited methods John Goerzen
2004-04-28 16:56 ` james woodyatt
2004-04-28 19:43   ` John Goerzen
2004-04-28 22:48     ` Jacques GARRIGUE
2004-04-29  8:11       ` Henri DF
2004-04-29  8:48         ` Jacques GARRIGUE

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).