On Monday, 1 October 2018 at 13:49:53 UTC, Emil wrote:
I am trying my hand at contracts and they work fine in plain
functions and in methods, but I can't make them work in
interfaces.
https://dlang.org/spec/interface.html#interface-contracts
$ dmd --version
DMD64 D Compiler v2.081.1
Copyright
I am trying my hand at contracts and they work fine in plain
functions and in methods, but I can't make them work in
interfaces.
https://dlang.org/spec/interface.html#interface-contracts
$ dmd --version
DMD64 D Compiler v2.081.1
Copyright (C) 1999-2018 by The D Language Foundation, All Rights
Thanks for your reply!
I'll investigate further and report a bug if necessary.
On 12/14/2012 12:11 AM, Yann wrote:
>>> why does this produce a segmentation fault when executed:
There are quite a few bugs about interface contracts and inherited
contracts:
http://d.puremagic.com/issues/buglist.cgi?quicksearch=interface+contract
Although, I haven't seen one about segmen
Thanks for your reply!
@property uint n();
n() needs to be const:
@property uint n() const;
Ok. Why is that?
why does this produce a segmentation fault when executed:
I don't know, you should show us a more complete minimal code
that shows the segfault.
Here you go (I stripped it do
Yann:
could someone tell me what the problem(s) with the following
are?
//why does this not compile:
out(g) { assert(g.n == end - start); }
@property uint n();
n() needs to be const:
@property uint n() const;
why does this produce a segmentation fault when executed:
I don't
Hi,
could someone tell me what the problem(s) with the following are?
Also, how do I make "$" work with the slice operator?
Thanks a lot.
interface Graph
{
bool opIndex(uint u, uint v)
in { assert(u < n && v < n); }
Graph opSlice(uint start, uint end)
in { assert(start < n && end <=