Conversation
Owner
Author
|
This change is part of the following stack: Change managed by git-spice. |
1e51cea to
2ee11c8
Compare
`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>
2ee11c8 to
1ad6341
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.
Bumps the Go toolchain version to 1.26 and releases v0.9.0.
Test fix
e_go1.24.gotested the analyzer againsttype 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/typesto 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.gois alreadyexercised by
testdata/src/a/a.goandtestdata/src/c/c.go,so test coverage is not lost.