[Issue 23244] New: [REG 2.100.1]Functions with function parameter give strange error messages
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 13 15:59:16 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23244
Issue ID: 23244
Summary: [REG 2.100.1]Functions with function parameter give
strange error messages
Product: D
Version: D2
Hardware: All
OS: Windows
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: zan77137 at nifty.com
Following code displays strange error messages on dmd 2.100.1 (current stable
branch):
------------------------------------------------
void main() @safe {
ubyte[] bin(ubyte[] dat...) { return dat; }
}
------------------------------------------------
Error: typesafe variadic function parameter `dat` of type `ubyte[]` cannot be
marked `return`
Even though there is actually no return mark, the error message points out as
if it is marked.
Also, this error does not occur in 2.100.0.
Even if this error is legitimate, there should be a period of time during which
it is deprecated, rather than suddenly making it an error.
--
More information about the Digitalmars-d-bugs
mailing list