mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
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.
20 lines
646 B
Zig
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});
|
|
}
|