Skip to content

fix(checker): widen match result arms to expected unions#154

Merged
akonwi merged 1 commit into
mainfrom
investigate.issue-151
May 27, 2026
Merged

fix(checker): widen match result arms to expected unions#154
akonwi merged 1 commit into
mainfrom
investigate.issue-151

Conversation

@akonwi
Copy link
Copy Markdown
Owner

@akonwi akonwi commented May 27, 2026

Summary

  • Check final match expressions against the enclosing expected return type
  • Propagate expected expression context into match arm blocks
  • Add regression coverage for Result::ok union variants in match arms

Fixes #151

Tests

  • cd compiler && go generate ./std_lib/ffi && go test ./...

@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ard-lang-dev Ready Ready Preview, Comment May 27, 2026 4:13am

@akonwi akonwi force-pushed the investigate.issue-151 branch from 6371efc to c086d02 Compare May 27, 2026 04:12
@akonwi akonwi merged commit 066fd39 into main May 27, 2026
6 checks passed
@akonwi akonwi deleted the investigate.issue-151 branch May 27, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type checker: match arms returning struct-union variants don't unify to the union type

1 participant