1
0
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:
Delyan Angelov 2021-05-06 19:54:49 +03:00
parent 3aa85bb5d7
commit ac2eaa05c7
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -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]
}
}