Repository navigation
Description
Small, independent items found by the reviews of PR #16. None hides a known high-impact bug. Pick off one at a time and tick it here.
Correctness
-
type I2 I1(a defined type over an interface) getskind: interfacebut no methods or base types. Populate its method set from the underlying interface. -
Panic detection misses a method value taken through a struct that embeds an interface (
s.M, wheresembeds a nil interface). Noexceptionedge is added. -
Unresolved receiver types. A method value on a receiver whose type failed to type-check is recorded as a field path (
req.Set) inddgvar. Record it as a method use. This one is cosmetic. -
Builtin-scope types. Calls on them, such as
err.Error(), get a junk internal callee signature (.error.Error). The emitted callee is correctly null. Record no signature. -
Symlinked project directories. Library detection compares paths with
filepath.Absbut notEvalSymlinks, so a symlinked project directory can misclassify files. Resolve symlinks before comparing. -
Spans in malformed functions. In a function with severe syntax errors, L3 body-node spans can be inverted or point into another file (e.g. bytes
[113,0]). There is no crash.BuildNodestakes End positions fromfset.Positionwithout checking they are in the node's file (internal/dataflow/bodynodes.go). Clamp End to Pos's file. -
Reassigning a slice from
appendkills its element defs. Ins[0] = 5; s = append(s, n); return s[0], the strong def ofskills the earliers[*]def, althoughappendmay return the same backing array. Treats = append(s, …)as a weak def ofs[*].
Test coverage
- Superset check.
TestGateL2_SupersetOfL1builds its L2 input withoutexternal_symbols, so it skips the library-edge path. - Satellite call nodes. Their
parentassignment is untested for calls in foldedforinit/post,caselists,selectcomm clauses andrangeexpressions. Do this before L4: port wiring depends on it. - Range forms. Add a Go 1.23+ fixture module with exact-edge CFG tests for
rangeover an integer and over an iterator function.testdata/dataflowdeclaresgo 1.21.
Activity