From 0077f71c356e157beea60d76f893bdfa2a981772 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Sat, 13 Dec 2025 19:23:56 -0500 Subject: [PATCH] Convert issue8665 to eval test instead of fx test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bug doesn't require the fx platform to reproduce - it's purely an interpreter issue with method dispatch on nominal types. The eval test in src/eval/test/eval_test.zig is sufficient. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/cli/test/fx_platform_test.zig | 15 --------------- test/fx/issue8665.roc | 12 ------------ 2 files changed, 27 deletions(-) delete mode 100644 test/fx/issue8665.roc diff --git a/src/cli/test/fx_platform_test.zig b/src/cli/test/fx_platform_test.zig index d41ecbf342..426a4804dd 100644 --- a/src/cli/test/fx_platform_test.zig +++ b/src/cli/test/fx_platform_test.zig @@ -1162,18 +1162,3 @@ test "external platform memory alignment regression" { try checkSuccess(run_result); } - -test "fx platform Try.ok_or static dispatch regression" { - // Regression test for issue #8665: InvalidMethodReceiver crash on static dispatch for Try type - // The traditional function call syntax works: - // _str1 = Try.ok_or(List.get(list, 0), "") - // But the method call syntax crashes: - // _str2 = List.get(list, 0).ok_or("") - const allocator = testing.allocator; - - const run_result = try runRoc(allocator, "test/fx/issue8665.roc", .{}); - defer allocator.free(run_result.stdout); - defer allocator.free(run_result.stderr); - - try checkSuccess(run_result); -} diff --git a/test/fx/issue8665.roc b/test/fx/issue8665.roc deleted file mode 100644 index 5a8e22bd03..0000000000 --- a/test/fx/issue8665.roc +++ /dev/null @@ -1,12 +0,0 @@ -app [main!] { pf: platform "./platform/main.roc" } - -# Regression test for issue #8665: InvalidMethodReceiver crash on static dispatch for Try type -# The traditional function call syntax works: -# _str1 = Try.ok_or(List.get(list, 0), "") -# But the method call syntax crashes: -# _str2 = List.get(list, 0).ok_or("") -main! = || { - list = [""] - _str1 = Try.ok_or(List.get(list, 0), "") - _str2 = List.get(list, 0).ok_or("") -}