15 lines
99 B
V
15 lines
99 B
V
|
struct St {
|
||
|
mut:
|
||
|
x int
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
mut a := &St{
|
||
|
x: 5
|
||
|
}
|
||
|
lock a {
|
||
|
a.x++
|
||
|
}
|
||
|
println(a)
|
||
|
}
|