Files
Tamir Duberstein c3dc444460 checklocks: fix generics Origin fact lookup
checklocks attaches lock facts to the declaration objects produced by
go/types, but SSA analysis of generic code can observe instantiated
`*types.Var/*types.Func` objects instead. Importing facts from those
instantiated objects fails, which causes spurious inference warnings
("may require checklocks annotation...") and can miss expected
checklocksfail reports.

Fix this by falling back to Origin() when importing lock guard and
function facts, and by normalizing inference observation keys to the
origin object so inference uses the same fact identity as export.

Add regression coverage for generic methods and functions, including a
cross-package generics.
2026-01-06 16:55:41 -05:00
..