Thread overview
[Issue 20506] [DIP1000] scope variable cannot be thrown
Jul 11, 2021
Dennis
Dec 17, 2022
Iain Buclaw
July 11, 2021
https://issues.dlang.org/show_bug.cgi?id=20506

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dkorpel@live.nl

--- Comment #1 from Dennis <dkorpel@live.nl> ---
It's not that obvious, checking nothrow is not enough. This is not allowed:

```
void main () @safe @nogc nothrow
{
    try {
        scope exc = new Exception("Baguette");
        throw exc;
    } catch (Exception e) {
        assert(e is exc);
    }
}
```

There needs to be a check whether the try-catch block that catches the exception is inside the scope of the variable that is being thrown.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=20506

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
December 13
https://issues.dlang.org/show_bug.cgi?id=20506

--- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/19659

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--