Playground: Experiments with vlang.io to prepare for pre-production use.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
module main |
|
|
|
struct StructA { |
|
x int |
|
y int |
|
} |
|
|
|
struct StructB { |
|
StructA |
|
mut: |
|
z string |
|
} |
|
|
|
fn main() { |
|
mut b := StructB{ |
|
StructA: StructA{ |
|
x: 1 |
|
y: 2 |
|
} |
|
} |
|
b.z = 'hey' |
|
}
|
|
|