www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18195] New: out/in need to be nothrow

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

          Issue ID: 18195
           Summary: out/in need to be nothrow
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

The following shouldn't be allowed:

---
int foo()
out
{
    throw new Exception("a");
}
do
{
   return 2;
}

void main()
{
    foo();
}
---


See also: https://github.com/dlang/dmd/pull/7553

--
Jan 05 2018