www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18203] New: Accessing accessing out parameters in an 'in'

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

          Issue ID: 18203
           Summary: Accessing accessing out parameters in an 'in' contract
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

---
int foo(out int bar)
in
{
    somevar = bar;     // This should be an error.
    somefunc(bar);     // This should be an error.
    assert(bar == 0);  // This should be an error.
}
do
{
    return 0;
}
---

See comments from https://github.com/dlang/dmd/pull/7553

--
Jan 07