Skip to content

Commit 63fa9ae

Browse files
committed
fix: correct microflow body syntax in bug-test 258
The bug-test script shipped with PR #258 used the old paren-body microflow form ('create microflow X returns Y (...)'), which the current MDL parser rejects. Studio Pro verification via 'mxcli check' fails before the script can even be executed. Rewrite the two microflows with the begin/end form so the script round-trips through check + exec. Functional payload (DROP + CREATE OR MODIFY with the same qualified name + DESCRIBE roundtrip) is unchanged. Verified: 'mxcli check mdl-examples/bug-tests/258-drop-create-microflow-unitid-preservation.mdl' reports 'Syntax OK (5 statements)'.
1 parent cf6860c commit 63fa9ae

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

mdl-examples/bug-tests/258-drop-create-microflow-unitid-preservation.mdl

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,26 @@
2424

2525
create module BugTest258;
2626

27-
create microflow BugTest258.MF_Original
28-
returns string
29-
(
30-
set $return = 'original'
31-
);
27+
create microflow BugTest258.MF_Original ()
28+
returns string as $result
29+
begin
30+
declare $result string = 'original';
31+
return $result;
32+
end;
33+
/
3234

3335
-- Drop + recreate in the same session. Before the fix, this produced a
3436
-- dangling Unit row with a fresh UUID and the project became unopenable in
3537
-- Studio Pro. After the fix, the new microflow reuses the original UnitID.
3638
drop microflow BugTest258.MF_Original;
3739

38-
create or modify microflow BugTest258.MF_Original
39-
returns string
40-
(
41-
set $return = 'replaced'
42-
);
40+
create or modify microflow BugTest258.MF_Original ()
41+
returns string as $result
42+
begin
43+
declare $result string = 'replaced';
44+
return $result;
45+
end;
46+
/
4347

4448
-- DESCRIBE must round-trip cleanly (no placeholder UUIDs leaking).
4549
describe microflow BugTest258.MF_Original;

0 commit comments

Comments
 (0)