Repository navigation
fix: verify local scalar type aliases without runtime operations - #300
Merged
Merged
Conversation
shanejonas
force-pushed
the
fix/go-local-scalar-aliases
branch
from
October 29, 2026 15:27
c13a658 to
6e8e704
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Valid Go such as
func F(a int32) int32 { type local = int32; var x local = a; return x }currently exports partial evidence and is rejected by native scalar matching. Scalar admission rejects every local type declaration, and the independent CFG verifier rejects the declaration statement.Admit non-generic aliases whose resolved underlying type is integer or Boolean. The independent source CFG skips type declarations because they add no runtime operation. Keep source inventory, binding/type, value, control and interface verification intact. Distinct local type definitions and other alias kinds remain outside admission.
Validation:
make check,make quality-gate,make cognitive, repository guard and affected-packagego vetpass. The required quality baseline is regenerated; absolute excess counts stay unchanged. Changed-function quality diagnostics are empty.Trusted-base local risk preflight: UNKNOWN, so this PR needs operator review and is not eligible for automatic merge. It affects four functions, above the current three-function LOW size limit, contains unresolved
go/typesinterface call targets, and adds declarations outside the base analyzer's covered body comparison. No gate or policy changes.Merge risk: unknown 👀
adapters/gopatterns/ir_reaching_subset.go:46: changed function contains unresolved call targets; call rules are incomplete.adapters/gopatterns/ir_reaching_subset.go:77: changed function contains unresolved call targets; call rules are incomplete.adapters/gopatterns/ir_reaching_subset.go: Go declarations or comments changed outside the function-body PDG comparison.Code impact: partial 👀
Affected functions: 4.
Dependencies: unchanged ✅
API diff: unchanged ✅
Compared base:
5721714b75c16315462f0053ee646a88da62f669· head:6e8e7044b21968a01d81f5bd90df169fd4909796