Browse thread
[Caml-list] Optional arguments in inherited methods
- John Goerzen
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | John Goerzen <jgoerzen@c...> |
| Subject: | [Caml-list] Optional arguments in inherited methods |
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