Skip to content

Simplify findImplementations#208

Merged
jupblb merged 5 commits intomainfrom
michal/simplify
Apr 15, 2026
Merged

Simplify findImplementations#208
jupblb merged 5 commits intomainfrom
michal/simplify

Conversation

@jupblb
Copy link
Copy Markdown
Collaborator

@jupblb jupblb commented Apr 15, 2026

No description provided.

jupblb added 4 commits April 15, 2026 12:54
…TypeName pattern

Adds support for *ast.IndexExpr (single type param), *ast.IndexListExpr
(multiple type params), and *ast.ParenExpr. Removes panic on unexpected
receiver list length.
Replace manual index-based iteration with Go 1.24 iterator methods
in listMethods and canonicalizeMethod.
…trimming

PkgNameOf (Go 1.22) reliably resolves the imported package via the type
checker, replacing the manual strings.Trim of the import path literal.
@jupblb jupblb force-pushed the michal/simplify branch 2 times, most recently from e67c623 to 1022fea Compare April 15, 2026 11:30
Use go/types.Implements for interface satisfaction checking instead of
reimplementing it with canonicalized method strings and intsets.Sparse
bitsets. This correctly handles all edge cases (embedded types, generics,
unexported methods from different packages).

Method correlation after implementation check now uses types.Id (the
standard Go method identity) instead of custom canonical signatures.

Removes canonicalizeMethod, implementationsForType, and the intsets
dependency from this package.
@jupblb jupblb merged commit cca9535 into main Apr 15, 2026
5 checks passed
@jupblb jupblb deleted the michal/simplify branch April 15, 2026 11:35
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