On Fri, 20 Feb 2015 22:51:21 +, Vlad Levenfeld wrote:
> On Friday, 20 February 2015 at 22:44:35 UTC, ketmar wrote:
>> can you go with `relationImpl` and mixin/template that generates
>> `relation` with contract then? something like:
>>
>> @reflexive @transitive bool relationImpl (T)(T a, T b
On 02/20/2015 02:32 PM, Vlad Levenfeld wrote:
I'd like to do something like this:
@reflexive @transitive bool relation (T)(T a, T b)
out (result) {
mixin(property_verification!result);
}
body {
...
}
which becomes
out (result) {
// generated from @reflexive
On Friday, 20 February 2015 at 22:44:35 UTC, ketmar wrote:
can you go with `relationImpl` and mixin/template that generates
`relation` with contract then? something like:
@reflexive @transitive bool relationImpl (T)(T a, T b) { ... }
alias relation = buildWithContracts!relationImpl;
then yo
On Fri, 20 Feb 2015 22:32:53 +, Vlad Levenfeld wrote:
> I'd like to do something like this:
>
>@reflexive @transitive bool relation (T)(T a, T b)
>out (result) {
> mixin(property_verification!result);
>}
>body {
> ...
>}
>
> which becomes
>
>out (result) {
I'd like to do something like this:
@reflexive @transitive bool relation (T)(T a, T b)
out (result) {
mixin(property_verification!result);
}
body {
...
}
which becomes
out (result) {
// generated from @reflexive
assert (result == skip_contract!relation (b,a));