mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tests: add interface_many_named_test.v regression test (closes #10013)
This commit is contained in:
parent
3aa85bb5d7
commit
ac2eaa05c7
@ -0,0 +1,26 @@
|
|||||||
|
interface Named {
|
||||||
|
name string
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Many {
|
||||||
|
pub:
|
||||||
|
many []Named
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Cat {
|
||||||
|
pub:
|
||||||
|
name string
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Dog {
|
||||||
|
pub:
|
||||||
|
name string
|
||||||
|
}
|
||||||
|
|
||||||
|
fn test_many_named() {
|
||||||
|
c := Cat{}
|
||||||
|
d := Dog{}
|
||||||
|
m := Many{
|
||||||
|
many: [c, d]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user