mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: add keep tests for struct init, fix warnings
This commit is contained in:
parent
c690c2f984
commit
43eaec325d
@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
os.system('echo hi')
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
os.system('echo hi')
|
||||||
}
|
}
|
||||||
|
11
vlib/v/fmt/tests/struct_init_keep.vv
Normal file
11
vlib/v/fmt/tests/struct_init_keep.vv
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
struct User {
|
||||||
|
age int
|
||||||
|
name string
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
u := User{
|
||||||
|
age: 54
|
||||||
|
}
|
||||||
|
println(u)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user