Skip to content

fix: verify scalar declarations without initializer expressions - #301

Merged
shanejonas merged 1 commit into
masterfrom
fix/go-scalar-zero-declarations
Oct 29, 2026
Merged

shanejonas merged 1 commit into
masterfrom
fix/go-scalar-zero-declarations

Conversation

@shanejonas

@shanejonas shanejonas commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Valid Go such as var a, b int32 is rejected by scalar native matching and stays partial in routine export. The operand-order check rejects multiple names even though this declaration has no initializer expressions to order. Existing lowering and the independent source, binding, CFG and value verifiers already preserve both zero definitions correctly.

Admit declarations without initializers through that check. Keep multiple initializer expressions, parallel assignments, independent arithmetic operands and multiple results excluded. This changes one production function; it adds no lowering representation or gate policy.

Validation:

  • Same nine-source corpus: 9 partial exports become 9 verified exports; native matching and routine export agree. All nine pass the unchanged shared schema.
  • A hand-written graph checks six nodes, nine value/execution dependencies and two separate definition identities on the same declaration. Missing or swapped reaching definitions are rejected. Five excluded-order cases remain partial.
  • Full make check, make quality-gate, make cognitive, repository guard and affected-package go vet pass. Regenerate the required quality baseline; all counts and rates stay unchanged. The changed function has no quality diagnostics.
  • The pinned external compatibility suite passes, and its 56 raw-output corruption controls are rejected. The existing 22-declaration corpus stays at 7 verified / 15 partial, plus two partial closure exports.

Trusted-base preflight on base 5f59b694198ae50c941ec2a57a980736b3faabb0 and head 5f61d39357855a01a668745eabdaf22e7c1056f0 reports LOW, with one affected function. Hosted checks and required reviews still control merge eligibility. No broader Go completeness claim.

Merge risk: low ✅

Code impact: changed 👀
Affected functions: 1.

Dependencies: unchanged ✅

API diff: unchanged ✅

Compared base: 7f604ae835c5091c5fe52d680a428d2a1376e576 · head: c9967601be10b6df367dc01d9a7d47f443de22fb

@shanejonas
shanejonas requested a review from zcstarr as a code owner October 28, 2026 16:22
@shanejonas
shanejonas enabled auto-merge (rebase) October 29, 2026 02:18
auto-merge was automatically disabled October 29, 2026 02:39

Rebase failed

@shanejonas
shanejonas force-pushed the fix/go-scalar-zero-declarations branch from 6cf6ebc to c996760 Compare October 29, 2026 04:05
@shanejonas
shanejonas merged commit 5721714 into master Oct 29, 2026
17 checks passed
@shanejonas
shanejonas deleted the fix/go-scalar-zero-declarations branch October 29, 2026 04:31
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.

1 participant