In/out contract inheritance in gdc
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Tue Apr 17 07:44:27 PDT 2012
On 14/04/12 02:11, Leandro Lucarella wrote:
> Doesn't look exactly like the same problem, but just in case, you might
> want to take a look at this bug:
> http://d.puremagic.com/issues/show_bug.cgi?id=7699
Here's a minimal(-ish) example that reproduces the problem (with or without
-inline statement in place). The same compiler error arises if you replace in{}
with out{}.
/////////////////////////////////////////////////////////////
class A
{
double foo(double x)
in
{
assert(x>0);
}
body
{
return x+1;
}
}
class B : A
{
override double foo(double x)
in
{
assert(x>10);
}
body
{
return x+10;
}
}
/////////////////////////////////////////////////////////////
Shall I make a new bug report? Is it preferred at BitBucket or GitHub?
More information about the D.gnu
mailing list