v2 / vlib / v / checker / tests / generics_method_called_variadic_arg_mismatch.out
14 lines · 14 sloc · 607 bytes · 3d60410b605d001e54f280070d5f952da9de1112
Raw
1vlib/v/checker/tests/generics_method_called_variadic_arg_mismatch.vv:3:23: notice: unused parameter: `data`
2 1 | struct Client {}
3 2 |
4 3 | fn (cl Client) req[T](data ...string) {}
5 | ~~~~
6 4 |
7 5 | struct Product {}
8vlib/v/checker/tests/generics_method_called_variadic_arg_mismatch.vv:8:4: error: to pass `options` (string) to `req` (which accepts type `...string`), use `...options`
9 6 |
10 7 | fn (c Client) products_list(options ...string) {
11 8 | c.req[Product](options) // (...options) works
12 | ~~~~~~~~~~~~~~~~~~~~~
13 9 | }
14 10 |
15