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

Due to the inability to detect warnings in REPL tests, I implemented running something very similar, but with the -prod flag enabled. (See https://github.com/vlang/v/pull/2536) There is also a minor change in os.walk_ext to not add duplicated path separators: /path//file.ext -> /path/file.ext
14 lines
191 B
V
14 lines
191 B
V
struct MyStruct {
|
|
s string
|
|
}
|
|
fn new_st() MyStruct {
|
|
return MyStruct{}
|
|
}
|
|
fn get_st() MyStruct {
|
|
r := new_st()
|
|
return {r|s:'6'}
|
|
}
|
|
fn main() {
|
|
s := get_st()
|
|
println(s)
|
|
} |