Skip to content

Commit 3b8c244

Browse files
jaredramirezclaude
andcommitted
Fix the two remaining branch test failures (all green)
test/fx/test_type_mismatch.roc returned a bare quote literal `"hello"`, which on this branch is an open literal reachable from main!'s signature. It's generalized rather than defaulted, so the entry-point check reports POLYMORPHIC VALUE (a load-bearing safety net — suppressing it makes the checker accept the program and crash in postcheck) before the cross-module platform-requirement check can report TYPE MISMATCH. Refactor the fixture to return a concretely-typed Str (annotated local) so it genuinely mismatches the platform's `() => {}`; the TYPE MISMATCH assertion is unchanged. Regenerate 3 drifted EXPECTED sections (--update-expected): a reordered TYPE MISMATCH entry in fuzz_crash_019/020 and an improved mismatch region (1:1:1:1 -> 4:6:4:13) in string_interpolation_type_mismatch. EXPECTED-only; no report-text/body changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4e228e6 commit 3b8c244

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

test/fx/test_type_mismatch.roc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
app [main!] { pf: platform "./platform/main.roc" }
22

3+
# The platform requires `main! : () => {}`, but this returns a Str.
4+
# The `msg : Str` annotation pins the body to a concrete Str so the mismatch
5+
# against the platform's required `{}` return surfaces as a TYPE MISMATCH.
6+
# (A bare `"hello"` would stay an open quote literal and the entry-point check
7+
# would instead report POLYMORPHIC VALUE — see fx_platform_test.)
38
main! = || {
4-
"hello"
9+
msg : Str
10+
msg = "hello"
11+
msg
512
}

test/snapshots/fuzz_crash/fuzz_crash_019.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ TOO FEW ARGS - fuzz_crash_019.md:84:2:86:3
199199
MISSING METHOD - fuzz_crash_019.md:86:11:86:17
200200
TYPE MISMATCH - fuzz_crash_019.md:98:4:104:3
201201
TYPE MISMATCH - fuzz_crash_019.md:105:2:105:54
202+
TYPE MISMATCH - fuzz_crash_019.md:77:11:77:14
202203
DECLARATION HAS NO VALUE - fuzz_crash_019.md:113:1:113:7
203204
DECLARATION HAS NO VALUE - fuzz_crash_019.md:116:1:116:13
204205
TYPE MISMATCH - fuzz_crash_019.md:119:2:119:10
205-
TYPE MISMATCH - fuzz_crash_019.md:77:11:77:14
206206
MISSING METHOD - fuzz_crash_019.md:105:55:105:66
207207
MISSING METHOD - fuzz_crash_019.md:105:55:105:72
208208
# PROBLEMS

test/snapshots/fuzz_crash/fuzz_crash_020.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ DECLARATION HAS NO VALUE - fuzz_crash_020.md:74:1:74:22
199199
MISSING METHOD - fuzz_crash_020.md:86:11:86:17
200200
TYPE MISMATCH - fuzz_crash_020.md:98:4:104:3
201201
TYPE MISMATCH - fuzz_crash_020.md:105:2:105:54
202+
TYPE MISMATCH - fuzz_crash_020.md:77:11:77:14
202203
DECLARATION HAS NO VALUE - fuzz_crash_020.md:113:1:113:7
203204
DECLARATION HAS NO VALUE - fuzz_crash_020.md:116:1:116:13
204205
TYPE MISMATCH - fuzz_crash_020.md:119:2:119:10
205-
TYPE MISMATCH - fuzz_crash_020.md:77:11:77:14
206206
MISSING METHOD - fuzz_crash_020.md:105:55:105:66
207207
MISSING METHOD - fuzz_crash_020.md:105:55:105:72
208208
# PROBLEMS

test/snapshots/string_interpolation_type_mismatch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ x = 42
1111
y = "value: ${x}"
1212
~~~
1313
# EXPECTED
14-
TYPE MISMATCH - string_interpolation_type_mismatch.md:1:1:1:1
14+
TYPE MISMATCH - string_interpolation_type_mismatch.md:4:6:4:13
1515
# PROBLEMS
1616
**TYPE MISMATCH**
1717
The `from_interpolation` method on `Str` has an incompatible type:

0 commit comments

Comments
 (0)