Skip to content

support Go 1.26, release v0.9.0#64

Merged
abhinav merged 2 commits intomainfrom
go1.26-support
Feb 18, 2026
Merged

support Go 1.26, release v0.9.0#64
abhinav merged 2 commits intomainfrom
go1.26-support

Conversation

@abhinav
Copy link
Owner

@abhinav abhinav commented Feb 18, 2026

Bumps the Go toolchain version to 1.26 and releases v0.9.0.

Test fix

e_go1.24.go tested the analyzer against
type genericAlias[T any] = T.
This construct has always been illegal per the Go spec:
a type alias cannot use its own type parameter as its RHS.
Go 1.18–1.25 silently accepted it due to a gap in
type-checker enforcement.
Go 1.26 closes that gap, causing go/types to reject the file,
which in turn caused the analysis test to fail
with "analysis skipped due to errors in package".

There is no valid Go generic alias form that produces
a composite literal of the aliased struct type,
so the scenario cannot be rewritten with an equivalent valid construct.
The non-generic alias code path in enforce.go is already
exercised by testdata/src/a/a.go and testdata/src/c/c.go,
so test coverage is not lost.

@abhinav
Copy link
Owner Author

abhinav commented Feb 18, 2026

This change is part of the following stack:

Change managed by git-spice.

abhinav and others added 2 commits February 17, 2026 20:33
`e_go1.24.go` tested the analyzer against
`type genericAlias[T any] = T`.
This construct has always been illegal per the Go spec:
a type alias cannot use its own type parameter as its RHS.
Go 1.18–1.25 silently accepted it due to a gap in
type-checker enforcement.
Go 1.26 closes that gap, causing `go/types` to reject the file,
which in turn caused the analysis test to fail
with "analysis skipped due to errors in package".

There is no valid Go generic alias form that produces
a composite literal of the aliased struct type,
so the scenario cannot be rewritten with an equivalent valid construct.
The non-generic alias code path in `enforce.go` is already
exercised by `testdata/src/a/a.go` and `testdata/src/c/c.go`,
so test coverage is not lost.

## LLM Assistance

Claude Code diagnosed the root cause
(Go 1.26 type-checker now enforcing a long-standing spec rule),
determined that no valid replacement test could cover
the same scenario, and removed the file.

Co-Authored-By: Claude <noreply@anthropic.com>
@abhinav abhinav merged commit a46a55c into main Feb 18, 2026
4 checks passed
@abhinav abhinav deleted the go1.26-support branch February 18, 2026 04:34
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

Comments