Commit fef5e5b
committed
refactor(goldmark): finish the fieldorder dedup, share assertOwnFieldsPointersBeforeScalars
Round-2 code review flagged that the earlier fieldorder extraction
only moved isPointerish (the smaller helper) into the shared package,
leaving assertOwnFieldsPointersBeforeScalars duplicated verbatim in
both pkg/goldmark/ast/structlayout_test.go and
pkg/goldmark/parser/structlayout_test.go -- and the two copies had
already drifted (one carried an extra comment sentence the other
lacked), which is exactly the divergence sharing code is meant to
prevent. Move it into fieldorder as AssertPointersBeforeScalars(t
testing.TB, ...).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJTrn4DizYTMdYj4tbswVJ1 parent 16ba274 commit fef5e5b
3 files changed
Lines changed: 30 additions & 48 deletions
File tree
- pkg/goldmark
- ast
- internal/fieldorder
- parser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 15 | | |
37 | 16 | | |
38 | 17 | | |
39 | | - | |
| 18 | + | |
40 | 19 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 18 | | |
41 | 19 | | |
42 | 20 | | |
43 | | - | |
| 21 | + | |
44 | 22 | | |
45 | 23 | | |
46 | 24 | | |
47 | | - | |
| 25 | + | |
48 | 26 | | |
49 | 27 | | |
50 | 28 | | |
51 | 29 | | |
52 | | - | |
| 30 | + | |
53 | 31 | | |
0 commit comments