tests: add interface_many_named_test.v regression test (closes #10013)
parent
3aa85bb5d7
commit
ac2eaa05c7
vlib/v/tests/interface_edge_cases
|
@ -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