roc/test_anno_only_debug.zig
Richard Feldman f527e463c5
Fix host to pass arguments as tuple struct
The host was passing a bare unit value, but Roc functions always expect
arguments wrapped in a tuple, even for single parameters. Updated fx
platform host to pass arguments as a struct matching tuple layout.

Still debugging TypeMismatch in interpreter evaluation.
2025-11-07 09:55:48 -05:00

20 lines
646 B
Zig

const std = @import("std");
const repl = @import("src/repl/eval.zig");
test "debug anno_only_crash" {
const gpa = std.testing.allocator;
// Initialize REPL
var replInst = try repl.Repl.init(gpa);
defer replInst.deinit();
// First line: foo : Str -> Str
const line1_output = try replInst.processInput("foo : Str -> Str");
defer gpa.free(line1_output);
std.debug.print("\nLine 1 output: {s}\n", .{line1_output});
// Second line: foo("test")
const line2_output = try replInst.processInput("foo(\"test\")");
defer gpa.free(line2_output);
std.debug.print("Line 2 output: {s}\n", .{line2_output});
}