struct T() { string[] tags; this(string[] tags...) { this.tags = tags; // typesafe variadic function parameter `tags` of type `string[]` cannot be marked `return` } } void test() { T!() t; } The trouble here is this(), being a template, gets attributes inferred. `return` is inferred for `tags`, which later on fails because such parameters cannot be `return`.
@WalterBright created dlang/dmd pull request #14320 "fix Issue 23262 - typesafe variadic function parameter cannot infer r…" fixing this issue: - fix Issue 23262 - typesafe variadic function parameter cannot infer return https://github.com/dlang/dmd/pull/14320
dlang/dmd pull request #14320 "fix Issue 23262 - typesafe variadic function parameter cannot infer r…" was merged into master: - 29c66cf8c1e1112e678e30acf36d5d1fa687dc79 by Walter Bright: fix Issue 23262 - typesafe variadic function parameter cannot infer return https://github.com/dlang/dmd/pull/14320