-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change the .vv sample with a more lightweight one, update the .out fi…
…le for it
- Loading branch information
Showing
2 changed files
with
28 additions
and
12 deletions.
There are no files selected for viewing
21 changes: 14 additions & 7 deletions
21
vlib/v/checker/tests/struct_implements_interface_more_than_once_err.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | } |
19 changes: 14 additions & 5 deletions
19
vlib/v/checker/tests/struct_implements_interface_more_than_once_err.vv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |