Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
slow_tests
/
inout
/
comptime_selector_of_interface.vv
16
lines
·
13
sloc
·
171 bytes
·
0b792c541a29f0ba1434c60b2d102c4cf39e88ee
Raw
1
struct People {
2
count int
3
}
4
5
interface IPeople {
6
count int
7
}
8
9
fn main() {
10
p := IPeople(People{42})
11
12
dump(p.count)
13
$for f in IPeople.fields {
14
dump(p.$(f.name))
15
}
16
}
17