Is it possible to write a lamba expression with a contract? This is
what I try to do now, and I get a compiler error.
Example:
delegate void strict_increment (int value);
...
int local_value = 0;
strict_increment = (value) requires (value > 0) => {
local_value += value;
}
_
On Sat, Mar 27, 2010 at 03:57:26 +0800, PCMan wrote:
> > So, the problem is that the function return values are falsely
> > marked as unowned in the VAPI. I reported a bug for it at
> > https://bugzilla.gnome.org/show_bug.cgi?id=614044
> >
> >> However, with Vala, how can I make vala methods return
On Sat, Mar 27, 2010 at 3:06 AM, Julian Andres Klode wrote:
> On Sat, Mar 27, 2010 at 02:37:37AM +0800, PCMan wrote:
>> On Sat, Mar 27, 2010 at 12:17 AM, Julian Andres Klode
>> wrote:
>> > Well, than f_finish() should probably not be there in the Volume
>> > interface; so I think that's a bug.
>
On Sat, Mar 27, 2010 at 02:37:37AM +0800, PCMan wrote:
> On Sat, Mar 27, 2010 at 12:17 AM, Julian Andres Klode
> wrote:
> > Well, than f_finish() should probably not be there in the Volume
> > interface; so I think that's a bug.
> So how can I fix this? Ship with a custom glib vapi file and remov
On Sat, Mar 27, 2010 at 12:17 AM, Julian Andres Klode
wrote:
> On Fri, Mar 26, 2010 at 11:56:04PM +0800, PCMan wrote:
>> Thanks for the fast reply.
>>
>> On Fri, Mar 26, 2010 at 6:45 PM, Julian Andres Klode
>> wrote:
>> > On Fri, Mar 26, 2010 at 11:07:20AM +0800, PCMan wrote:
>> >> Hi list,
>>
On Fri, Mar 26, 2010 at 11:56:04PM +0800, PCMan wrote:
> Thanks for the fast reply.
>
> On Fri, Mar 26, 2010 at 6:45 PM, Julian Andres Klode
> wrote:
> > On Fri, Mar 26, 2010 at 11:07:20AM +0800, PCMan wrote:
> >> Hi list,
> >> I tried to use Vala for the first time and the following code failed
Thanks for the fast reply.
On Fri, Mar 26, 2010 at 6:45 PM, Julian Andres Klode wrote:
> On Fri, Mar 26, 2010 at 11:07:20AM +0800, PCMan wrote:
>> Hi list,
>> I tried to use Vala for the first time and the following code failed
>> to generate correct C code.
>> Is this a bug of vala or what's wro
On Fri, Mar 26, 2010 at 11:07:20AM +0800, PCMan wrote:
> Hi list,
> I tried to use Vala for the first time and the following code failed
> to generate correct C code.
> Is this a bug of vala or what's wrong with my code? (code is attached
> to the end of this mail)
You define *_finish which is alre
Hi list,
I tried to use Vala for the first time and the following code failed
to generate correct C code.
Is this a bug of vala or what's wrong with my code? (code is attached
to the end of this mail)
In addition, if I want to override a virtual function in a parent
class with the prototype like t