Re: [Vala] Impossible to subclass from gio stream classes?



On Wed, Sep 30, 2009 at 7:46 PM, Jan Hudec <bulb ucw cz> wrote:
On Wed, Sep 30, 2009 at 18:58:54 +0200, Philipp Zabel wrote:
I'd like to subclass GLib.BufferedInputStream.
Vala doesn't like the following construct:

class MyStream : GLib.BufferedInputStream {
    MyStream (GLib.InputStream base_stream) {
        base (base_stream);
    }
}

$ valac mystream.vala --pkg gio-2.0
mystream.vala:3.3-3.20: error: chain up to
`GLib.BufferedInputStream..new' not supported
        base (base_stream);
        ^^^^^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)

Am I doing it wrong? BufferedInputStream has a constructor that takes
one GLib.InputStream.

Short story:
------------

   MyStream (GLib.InputStream _base_stream) {
       base_stream = _base_stream;
   }

Long story:
-----------

[...]
--
                                                Jan 'Bulb' Hudec <bulb ucw cz>

I take it this has changed recently?
Last time I checked constructor chaining worked flawlessly. Is there
any documentation on this new behavior?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]