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

checker/cgen: interface match

This commit is contained in:
Alexander Medvednikov
2020-05-31 10:22:18 +02:00
parent c4241f90e6
commit f87e872fa2
5 changed files with 42 additions and 15 deletions

View File

@@ -247,3 +247,13 @@ fn new_animal() Animal {
fn new_animal2() Animal {
return new_animal()
}
/*
fn animal_match(a Animal) {
match a {
Dog { println('(dog)') }
Cat { println('(cat)') }
else {}
}
}
*/