✓
Passing This code compiles and runs correctly.
Code
// Test: Circular Imports
//
// Tests that circular/mutual imports don't crash the compiler.
// A imports B, B imports A - this should work without infinite loop.
const std = @import("std");
~import "$std/io"
~import "$app/module_b"
~pub event from_a {}
| done { msg: []const u8 }
~proc from_a {
std.debug.print("Event from module A\n", .{});
return .{ .done = .{ .msg = "hello from A" } };
}
~from_a()
| done d |> std.io:println(text: d.msg)
Expected Output
Event from module A
hello from A
Imported Files
// Module B - imports module A (creating a cycle)
~import "$app/input"
~pub event from_b {}
| done { msg: []const u8 }
Test Configuration
MUST_RUN