Skip to content

test: Add generic type corner case tests#65

Merged
abhinav merged 1 commit intomainfrom
test-generic-corner-cases
Feb 18, 2026
Merged

test: Add generic type corner case tests#65
abhinav merged 1 commit intomainfrom
test-generic-corner-cases

Conversation

@abhinav
Copy link
Owner

@abhinav abhinav commented Feb 18, 2026

The v0.9.0 release added Go 1.26 support
but removed a generic alias test
without replacing the coverage.
These two new test packages
verify the analyzer handles generics correctly.

Package g tests generic struct fundamentals:
basic instantiation, multiple type parameters,
pointers, map/slice contexts,
return-with-error skipping, nested generics,
and self-referencing generic types (Go 1.26).

Package h tests generic aliases
and cross-package usage:
non-generic aliases to instantiated generics,
parameterized aliases forwarding type params,
narrower constraint aliases, chained aliases,
embedded generic types, and direct cross-package
generic struct literals.

@abhinav
Copy link
Owner Author

abhinav commented Feb 18, 2026

This change is part of the following stack:

Change managed by git-spice.

The v0.9.0 release added Go 1.26 support
but removed a generic alias test
without replacing the coverage.
These two new test packages
verify the analyzer handles generics correctly.

Package `g` tests generic struct fundamentals:
basic instantiation, multiple type parameters,
pointers, map/slice contexts,
return-with-error skipping, nested generics,
and self-referencing generic types (Go 1.26).

Package `h` tests generic aliases
and cross-package usage:
non-generic aliases to instantiated generics,
parameterized aliases forwarding type params,
narrower constraint aliases, chained aliases,
embedded generic types, and direct cross-package
generic struct literals.

## LLM Assistance

Claude Code identified the corner cases
by cross-referencing the Go 1.26 spec
with existing test coverage,
then generated all test cases.

Co-Authored-By: Claude <noreply@anthropic.com>
@abhinav abhinav force-pushed the test-generic-corner-cases branch from 0bf2cd9 to b31422a Compare February 18, 2026 04:51
@abhinav abhinav merged commit 0e7d0ae into main Feb 18, 2026
4 checks passed
@abhinav abhinav deleted the test-generic-corner-cases branch February 18, 2026 06:07
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