✗
Failing This test is currently failing.
Failed: wrong-error
Error Details
output_emitted.zig:55:72: error: expected ')', found ':'
Failure Output
🎯 Compiler coordination: Passes: 20 (flow-based: elaborate, analysis, emission)
Error: output_emitted.zig:55:72: error: expected ')', found ':'
const handles = std.heap.page_allocator.alloc(threading:WorkerHandle, 0) catch unreachable;
^ Code
// ============================================================================
// BUG 990: Slice Types from Imported Modules Generate Invalid Zig
// ============================================================================
//
// Issue: When a Koru event returns a slice of a type from an imported module,
// the generated Zig code has incorrect syntax.
//
// Expected Zig: handles: []const koru_mylib.Handle
// Actual Zig: handles: koru_[]const mylib.Handle ❌ INVALID!
//
// This affects any event that returns/accepts slices of imported types.
//
// Discovered while building std/threading library (test 2006)
// ============================================================================
const std = @import("std");
~import std/threading
// Minimal reproduction: Event that returns slice of imported type
~tor getHandles {} -> []const threading:WorkerHandle
~proc getHandles|zig {
// Create empty slice just to test codegen
const handles = std.heap.page_allocator.alloc(threading:WorkerHandle, 0) catch unreachable;
return handles;
}
// Try to use it
~getHandles()
| got |> _
Must fail at runtime:
Program must error when executed.
Flows
flow ~getHandles click a branch to expand · @labels scroll to their anchor
getHandles