1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser/cgen: interface <<; any type

This commit is contained in:
Alexander Medvednikov
2020-05-03 18:08:45 +02:00
parent 2a016d03ac
commit de749e9d3b
5 changed files with 39 additions and 5 deletions

View File

@@ -91,3 +91,11 @@ interface Speaker {
speak()
}
fn test_interface_array() {
mut animals := []Speaker{}
animals = [ Cat{}, Dog{} ]
animals << Cat{}
assert true
assert animals.len == 3
}