[Issue 24680] New: [dip1000] final auto class method infers scope but no return

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 24 19:05:44 UTC 2024


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

          Issue ID: 24680
           Summary: [dip1000] final auto class method infers scope but no
                    return
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dlang.org
          Assignee: nobody at puremagic.com
          Reporter: dkorpel at live.nl

```D
class C
{
    final auto peek(ubyte[] buf) { return buf; }
}

@safe escape(C c)
{
    ubyte[5] buf;
    return c.peek(buf[]);
}
```
This should error, but it only does when you remove `final`

--


More information about the Digitalmars-d-bugs mailing list