v2 / vlib / v / checker / tests / generics_method_called_arg_mismatch.out
12 lines · 12 sloc · 460 bytes · 3d60410b605d001e54f280070d5f952da9de1112
Raw
1vlib/v/checker/tests/generics_method_called_arg_mismatch.vv:14:23: notice: unused parameter: `val`
2 12 | struct Obj {}
3 13 |
4 14 | fn (mut o Obj) set[T](val T) {}
5 | ~~~
6vlib/v/checker/tests/generics_method_called_arg_mismatch.vv:3:15: error: cannot use `Foo` as `Bar` in argument 1 to `Obj.set`
7 1 | fn main() {
8 2 | mut obj := Obj{}
9 3 | obj.set[Bar](Foo{})
10 | ~~~~~
11 4 | }
12 5 |
13