Skip to content

sema: a bare variant of a generic enum is a pending generic binding (#2103) - #2107

Merged
ehartford merged 1 commit into
mainfrom
fix-2103
Oct 5, 2026
Merged

ehartford merged 1 commit into
mainfrom
fix-2103

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Fixes #2103. var best = None followed by best = Some(…), a typed use, or an argument position settles the binding's type; unsettled is a Sema error instead of a codegen failure. Tests added. Stage1 only so far — no gate, no battery.

…2103)

`var best = None` typed `best` as the bare generic enum; Sema said ok and
codegen failed ("aggregate enum payload missing destination payload
type"). The binding is now pending as `Vec.new()` is: what is assigned
to it, the type its use demands or the place it is passed to settles its
type arguments, and a binding nothing settles is the error "cannot infer
generic type". An assignment settles any pending binding.
@ehartford
ehartford added this pull request to stack #2110 October 5, 2026 00:14
@ehartford

Copy link
Copy Markdown
Contributor Author

Battery GREEN for stack #2110 at 38221ba (macOS arm64, seed-driven, with run tools/battery.w): gate rc=0 1044s, uat rc=0 26s, battery-checks rc=0 184s.

@ehartford
ehartford marked this pull request as ready for review October 5, 2026 00:36
@ehartford
ehartford merged commit e5a62bb into main Oct 5, 2026
@ehartford
ehartford deleted the fix-2103 branch October 5, 2026 00:36
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.

var best = None passes check, then codegen fails: aggregate enum payload missing destination payload type

1 participant