[Vala] Contracts on lambdas
- From: Tristin Celestin <tristin_celestin yahoo com>
- To: vala-list gnome org
- Subject: [Vala] Contracts on lambdas
- Date: Fri, 26 Mar 2010 15:01:23 -0700 (PDT)
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]