diff options
| author | suresh <sureshkrishnan.ai@gmail.com> | 2026-01-25 11:43:23 -0500 |
|---|---|---|
| committer | suresh <sureshkrishnan.ai@gmail.com> | 2026-01-25 11:43:23 -0500 |
| commit | 26a0b55ed5bce4ad0ba2af109cfc96da7be2e34c (patch) | |
| tree | 35ba8d7742b8ac727bfc6c4c73ab8b70f6eedb53 /examples/features/composition.zc | |
| parent | 0bb69cb67078dfa921b5b8a42275ef31dfbc9a56 (diff) | |
| parent | 489336b2101bf16edeec7bfc4379408eb19b936e (diff) | |
Merge branch 'main' into JsonType
# Conflicts:
# examples/data/json_config.zc
Diffstat (limited to 'examples/features/composition.zc')
| -rw-r--r-- | examples/features/composition.zc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/features/composition.zc b/examples/features/composition.zc index 883c348..64fb8e0 100644 --- a/examples/features/composition.zc +++ b/examples/features/composition.zc @@ -21,11 +21,11 @@ struct Rigidbody { fn main() { // Mixin usage - flattened fields - var t = Transform{ x: 10.0, y: 5.0, rotation: 90.0 }; + let t = Transform{ x: 10.0, y: 5.0, rotation: 90.0 }; println "Transform pos: ({t.x}, {t.y})"; // Named usage - nested fields - var rb = Rigidbody{ + let rb = Rigidbody{ position: Vector2{x: 0.0, y: 10.0}, velocity: Vector2{x: 1.0, y: 0.0}, mass: 50.0 |
