Commit 0444804
fix(test): remove trailing semicolons in test_opt_if_fold if-branches
`tests/codegen/test_opt_if_fold.affine` had `if true { 42; } else { 0; }`
where the trailing `;` makes each branch return Unit. The recent
typechecker work (in lib/typecheck.ml on this branch) tightened
unification so this now produces:
Unification error: (Unify.TypeMismatch (Unit, Int))
affinescript: Type error
Removed the trailing semicolons inside the if-branches; bare expressions
now return Int and `let x = if ...` typechecks. Added a comment
documenting the gotcha for future test authors.
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>1 parent 66f3509 commit 0444804
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
0 commit comments