July 24 [Issue 24680] New: [dip1000] final auto class method infers scope but no return | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: dkorpel@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` -- |
Copyright © 1999-2021 by the D Language Foundation