From 437b247335dcf496bc30c0dbccf4e8a2c5e1b305 Mon Sep 17 00:00:00 2001 From: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com> Date: Mon, 18 May 2026 21:17:42 +0100 Subject: [PATCH] fix(affine): migrate record literals to #{ } (affinescript#218) extension_lifecycle_test.affine used the old bare-{ } record-literal syntax in expression position (6 sites in mk_/initialise/attach_profile/ start_running/record_activity). AffineScript #218 makes bare { always a block; record/struct literals now require the #{ } sigil. struct State is a type declaration and is unchanged. Refs hyperpolymath/affinescript#218 Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/affine/extension_lifecycle_test.affine | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/affine/extension_lifecycle_test.affine b/tests/affine/extension_lifecycle_test.affine index 55b6449..db364d5 100644 --- a/tests/affine/extension_lifecycle_test.affine +++ b/tests/affine/extension_lifecycle_test.affine @@ -39,16 +39,16 @@ struct State { } fn mk_uninit() -> State { - { tag: 0, profile_id: 0, activity_count: 0 } + #{ tag: 0, profile_id: 0, activity_count: 0 } } fn mk_terminated() -> State { - { tag: 4, profile_id: 0, activity_count: 0 } + #{ tag: 4, profile_id: 0, activity_count: 0 } } fn initialise(s: State) -> State { if s.tag == 0 { - { tag: 1, profile_id: 0, activity_count: 0 } + #{ tag: 1, profile_id: 0, activity_count: 0 } } else { s } @@ -56,7 +56,7 @@ fn initialise(s: State) -> State { fn attach_profile(s: State, pid: Int) -> State { if s.tag == 1 { - { tag: 2, profile_id: pid, activity_count: 0 } + #{ tag: 2, profile_id: pid, activity_count: 0 } } else { s } @@ -64,7 +64,7 @@ fn attach_profile(s: State, pid: Int) -> State { fn start_running(s: State) -> State { if s.tag == 2 { - { tag: 3, profile_id: s.profile_id, activity_count: 0 } + #{ tag: 3, profile_id: s.profile_id, activity_count: 0 } } else { s } @@ -72,7 +72,7 @@ fn start_running(s: State) -> State { fn record_activity(s: State) -> State { if s.tag == 3 { - { tag: 3, profile_id: s.profile_id, activity_count: s.activity_count + 1 } + #{ tag: 3, profile_id: s.profile_id, activity_count: s.activity_count + 1 } } else { s }