Gitly
English
Русский
Español
日本語
中文
Português
Pricing
Log in
Register
v2
/
vlib
/
v
/
checker
/
tests
/
time_duration_assign_to_int_err.vv
20
lines
·
16
sloc
·
178 bytes
·
50b936cd58723a86e121a5ec26561c438c4949eb
Raw
1
import time
2
3
struct Foo {
4
x int
5
}
6
7
fn bad_struct_init() {
8
d := time.second
9
_ := Foo{
10
x: d
11
}
12
}
13
14
fn bad_struct_init_direct() {
15
_ := Foo{
16
x: time.second
17
}
18
}
19
20
fn main() {}
21