Bug 23244 – [REG 2.100.1]Functions with function parameter give strange error messages

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2022-07-13T15:59:16Z
Last change time
2022-07-14T12:04:49Z
Assigned to
No Owner
Creator
SHOO

Comments

Comment #0 by zan77137 — 2022-07-13T15:59:16Z
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.
Comment #1 by razvan.nitu1305 — 2022-07-14T11:59:53Z
Comment #2 by dkorpel — 2022-07-14T12:04:49Z
*** This issue has been marked as a duplicate of issue 23022 ***