https://issues.dlang.org/show_bug.cgi?id=23022
Issue ID: 23022
Summary: [dip1000] typesafe variadic parameter should not infer
return
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Reduced from a unittest in std.path, uncovered by
https://github.com/dlang/dmd/pull/13993
```
auto ir(string[] p...)
{
return p;
}
```
As of https://github.com/dlang/dmd/pull/13710, typesafe variadic args may not
be `return scope` anymore. However, when the compiler infers `return scope`,
the errors is confusing:
Error: typesafe variadic function parameter `p` of type `string[]` cannot be
marked `return`
The compiler should not infer `return scope` in the first place.
--