diff --git a/vlib/v/checker/tests/struct_implements_interface_more_than_once_err.out b/vlib/v/checker/tests/struct_implements_interface_more_than_once_err.out index d5a962a3b7db16..44ad4a4819b038 100644 --- a/vlib/v/checker/tests/struct_implements_interface_more_than_once_err.out +++ b/vlib/v/checker/tests/struct_implements_interface_more_than_once_err.out @@ -1,7 +1,14 @@ -vlib/v/checker/tests/struct_implements_interface_more_than_once_err.vv:4:35: error: struct type Walker cannot implement interface `v.ast.walker.Visitor more than once` - 2 | import v.ast { Node } - 3 | - 4 | struct Walker implements Visitor, Visitor, Visitor { - | ~~~~~~~ - 5 | aaa string - 6 | } +vlib/v/checker/tests/struct_implements_interface_more_than_once_err.vv:3:31: error: struct type Abc cannot implement interface `io.Writer more than once` + 1 | import io { Writer } + 2 | + 3 | struct Abc implements Writer, Writer, Writer { + | ~~~~~~ + 4 | aaa string + 5 | } +vlib/v/checker/tests/struct_implements_interface_more_than_once_err.vv:12:31: error: struct type Def cannot implement interface `io.Writer more than once` + 10 | + 11 | // vfmt off + 12 | struct Def implements Writer, io.Writer { + | ~~ + 13 | aaa string + 14 | } diff --git a/vlib/v/checker/tests/struct_implements_interface_more_than_once_err.vv b/vlib/v/checker/tests/struct_implements_interface_more_than_once_err.vv index a690d3d20d0657..838e27ddb03538 100644 --- a/vlib/v/checker/tests/struct_implements_interface_more_than_once_err.vv +++ b/vlib/v/checker/tests/struct_implements_interface_more_than_once_err.vv @@ -1,10 +1,19 @@ -import v.ast.walker { Visitor } -import v.ast { Node } +import io { Writer } -struct Walker implements Visitor, Visitor, Visitor { +struct Abc implements Writer, Writer, Writer { aaa string } -fn (mut n Walker) visit(node &Node) ! { - panic('not implemented') +fn (a Abc) write(buf []u8) !int { + return 42 +} + +// vfmt off +struct Def implements Writer, io.Writer { + aaa string +} +// vfmt on + +fn (a Def) write(buf []u8) !int { + return 42 }