summary refs log tree commit diff stats
path: root/lib/std/private/gitutils.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2024-09-29 11:23:59 +0300
committerGitHub <noreply@github.com>2024-09-29 10:23:59 +0200
commitb0e6d28782ce8c3d8e0b4a64e01f21d6f900648f (patch)
treeacc9c48b9b42049f4eba5d8eff1961943f2b8895 /lib/std/private/gitutils.nim
parent7974a2208c848440cc5188ee3f38f0432b2ee1db (diff)
downloadNim-b0e6d28782ce8c3d8e0b4a64e01f21d6f900648f.tar.gz
fix logic for `dcEqIgnoreDistinct` in `sameType` (#24197)
fixes #22523

There were 2 problems with the code in `sameType` for
`dcEqIgnoreDistinct`:

1. The code that skipped `{tyDistinct, tyGenericInst}` only ran if the
given types had different kinds. This is fixed by always performing this
skip.
2. The code block below that checks if `tyGenericInst`s have different
values still ran for `dcEqIgnoreDistinct` since it checks if the given
types are generic insts, not the skipped types (and also only the 1st
given type). This is fixed by only invoking this block for `dcEq`;
`dcEqOrDistinctOf` (which is unused) also skips the first given type.
Arguably there is another issue here that `skipGenericAlias` only ever
skips 1 type.

These combined fix the issue (`T` is `GenericInst(V, 1, distinct int)`
and `D[0]` is `GenericInst(D, 0, distinct int)`).

#24037 shouldn't be a dependency but the diff follows it.
Diffstat (limited to 'lib/std/private/gitutils.nim')
0 files changed, 0 insertions, 0 deletions
> 2022-06-17 22:24:46 -0700 drop last couple of manual tests' href='/akkartik/view.love/commit/main_tests.lua?id=1ecc3f43e5949596ccb1bf9e2c9ad143d779deb1'>1ecc3f4 ^
b90a54a ^
b90a54a ^
0f02efd ^
b90a54a ^





2a0a770 ^
0f02efd ^
0e0f36f ^
1d1a829 ^
2a0a770 ^
b90a54a ^

a874747 ^
69f4062 ^

69f4062 ^













0e0f36f ^
1d1a829 ^
69f4062 ^
2a0a770 ^



69f4062 ^

bfbe73e ^
3b36093 ^
13f67fa ^
bfbe73e ^

















2a0a770 ^



13f67fa ^
bfbe73e ^

d009390 ^
3b36093 ^
d009390 ^
8bbc1ff ^

b700021 ^
d009390 ^



















2a0a770 ^
d009390 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117