[Issue 14779] incorrect addressing of arguments in require/in-contract

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jul 7 02:09:52 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14779

--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
Introduced in:
https://github.com/D-Programming-Language/dmd/pull/4788

And, I found a long-standing wrong-code issue with out-contract, which the root
issue would be same with.

class Foo
{
    final @property void value(int val)
  //in  { assert(val == 0); }
    out { assert(val == 0); }   // assertion fails
    body
    {
    }
}

void main()
{
    auto foo = new Foo();
    foo.value = 0;
}

--


More information about the Digitalmars-d-bugs mailing list