|
1 | 1 | // exact-check |
2 | | -// ignore-order |
3 | 2 |
|
4 | 3 | const EXPECTED = [ |
5 | 4 | { |
6 | 5 | query: '-> trait:Some', |
7 | 6 | others: [ |
8 | | - { path: 'foo', name: 'alef' }, |
9 | 7 | { path: 'foo', name: 'alpha' }, |
| 8 | + { path: 'foo', name: 'alef' }, |
10 | 9 | ], |
11 | 10 | }, |
12 | 11 | { |
13 | 12 | query: '-> generic:T', |
14 | 13 | others: [ |
| 14 | + { path: 'foo', name: 'beta' }, |
15 | 15 | { path: 'foo', name: 'bet' }, |
16 | 16 | { path: 'foo', name: 'alef' }, |
17 | | - { path: 'foo', name: 'beta' }, |
18 | 17 | ], |
19 | 18 | }, |
20 | 19 | { |
@@ -44,38 +43,40 @@ const EXPECTED = [ |
44 | 43 | { |
45 | 44 | query: 'Other, Other', |
46 | 45 | others: [ |
47 | | - { path: 'foo', name: 'other' }, |
48 | 46 | { path: 'foo', name: 'alternate' }, |
| 47 | + { path: 'foo', name: 'other' }, |
49 | 48 | ], |
50 | 49 | }, |
51 | 50 | { |
52 | 51 | query: 'generic:T', |
53 | 52 | in_args: [ |
54 | | - { path: 'foo', name: 'bet' }, |
55 | 53 | { path: 'foo', name: 'beta' }, |
56 | | - { path: 'foo', name: 'other' }, |
| 54 | + { path: 'foo', name: 'bet' }, |
57 | 55 | { path: 'foo', name: 'alternate' }, |
| 56 | + { path: 'foo', name: 'other' }, |
58 | 57 | ], |
59 | 58 | }, |
60 | 59 | { |
61 | 60 | query: 'generic:Other', |
62 | 61 | in_args: [ |
63 | | - { path: 'foo', name: 'bet' }, |
64 | 62 | { path: 'foo', name: 'beta' }, |
65 | | - { path: 'foo', name: 'other' }, |
| 63 | + { path: 'foo', name: 'bet' }, |
66 | 64 | { path: 'foo', name: 'alternate' }, |
| 65 | + { path: 'foo', name: 'other' }, |
67 | 66 | ], |
68 | 67 | }, |
69 | 68 | { |
70 | 69 | query: 'trait:Other', |
71 | 70 | in_args: [ |
72 | | - { path: 'foo', name: 'other' }, |
73 | 71 | { path: 'foo', name: 'alternate' }, |
| 72 | + { path: 'foo', name: 'other' }, |
74 | 73 | ], |
75 | 74 | }, |
76 | 75 | { |
77 | 76 | query: 'Other', |
78 | 77 | in_args: [ |
| 78 | + // because function is called "other", it's sorted first |
| 79 | + // even though it has higher type distance |
79 | 80 | { path: 'foo', name: 'other' }, |
80 | 81 | { path: 'foo', name: 'alternate' }, |
81 | 82 | ], |
|
0 commit comments