mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
parser: fix register() bug in interfaces
This commit is contained in:
parent
28117353a9
commit
3e564a2506
2 changed files with 21 additions and 1 deletions
|
@ -53,3 +53,23 @@ fn test_perform_speak() {
|
|||
|
||||
}
|
||||
|
||||
interface Register {
|
||||
register()
|
||||
}
|
||||
|
||||
struct RegTest {a int}
|
||||
|
||||
fn (f RegTest) register() {
|
||||
}
|
||||
|
||||
fn handle_reg(r Register) {
|
||||
}
|
||||
|
||||
fn test_register() {
|
||||
f := RegTest{}
|
||||
f.register()
|
||||
handle_reg(f)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue