[Issue 24802] New: Wrong error message

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 9 13:49:55 UTC 2024


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

          Issue ID: 24802
           Summary: Wrong error message
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: turkeyman at gmail.com

struct S
{
    ~this() nothrow;
}

void test() nothrow
{
    goto skip;
    S r;
skip:
}


error : cannot `goto` into `try` block


test() is nothrow, S.~this() is nothrow. There should be no `try` blocks in
sight... the message should be about skipping initialisation.

--


More information about the Digitalmars-d-bugs mailing list