mirror of
https://github.com/vlang/v.git
synced 2025-09-15 15:32:27 +03:00
14 lines
192 B
V
14 lines
192 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)
|
|
}
|