Commit a1aa556
Make coverage more similar to the one in Scala 2 (scala#23722)
Closes scala#21877
* removes coverage of inlined nodes (as mentioned in the accompanying
comment, those are impossible to represent in most cases)
* adds coverage for Literals (ones directly in Apply are omitted)
* removes coverage of `throw` contents
* if apply node is tagged, we do not tag it's prefix, outside of other
prefixing Apply's arguments (eg. when we tag `a+b+c` we do not
redundantly tag `a+b`)
* allows instrumenting synthetic method calls (like apply of a case
After all of these changes the statements tagged are much more similar
to Scala 2, let's look at the scala#21877 minimisation:
* Scala 2:
<img width="704" height="364" alt="Zrzut ekranu 2025-08-12 o 17 07 31"
src="https://github.com/user-attachments/assets/f647dfa5-973e-424f-9818-483b7d01d550"
/>
<img width="740" height="379" alt="Zrzut ekranu 2025-08-12 o 17 07 46"
src="https://github.com/user-attachments/assets/09eca1c0-a202-4e5e-b3e4-0947d9e8662d"
/>
* Scala 3:
<img width="623" height="360" alt="Zrzut ekranu 2025-08-12 o 17 08 48"
src="https://github.com/user-attachments/assets/efd5baaa-9f52-4ad6-9ba6-2f5bde42a470"
/>
<img width="638" height="428" alt="Zrzut ekranu 2025-08-12 o 17 08 55"
src="https://github.com/user-attachments/assets/01ff6cc6-c348-47db-8ae5-d758ca0bf302"
/>
There are some differences still remaining, most notably the tagging the
DefDefs and its default parameters, but I left them for now, as those
seem more useful than harmful.
BEcouse of those changed most of the .covergae files had to be
regenerated, however I want through each and every diff to make sure
that all of those changes there are expected.
Additionally, this PR also fixes scala#21695 (issue with certain generated
Block nodes not having assigned the correct type, causing later
undefined errors).1 parent 4c141e6 commit a1aa556
File tree
47 files changed
+2795
-1418
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/coverage
- pos
- i21695
- macro-late-suspend
- run
- currying
- erased
- extend-case-class
- i16940
- i18233-min
- i18233
- inheritance
- inline-def
- interpolation
- java-methods
- lifting-bool
- lifting
- macro-suspend
- parameterless
- trait
- type-apply
- varargs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
47 files changed
+2795
-1418
lines changedLines changed: 56 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
148 | 173 | | |
149 | 174 | | |
150 | 175 | | |
| |||
158 | 183 | | |
159 | 184 | | |
160 | 185 | | |
161 | | - | |
162 | | - | |
163 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
164 | 190 | | |
| 191 | + | |
165 | 192 | | |
166 | 193 | | |
167 | 194 | | |
| |||
171 | 198 | | |
172 | 199 | | |
173 | 200 | | |
174 | | - | |
175 | | - | |
| 201 | + | |
176 | 202 | | |
177 | 203 | | |
178 | | - | |
| 204 | + | |
179 | 205 | | |
180 | 206 | | |
181 | 207 | | |
| |||
187 | 213 | | |
188 | 214 | | |
189 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
190 | 220 | | |
191 | 221 | | |
192 | | - | |
| 222 | + | |
| 223 | + | |
193 | 224 | | |
194 | 225 | | |
195 | 226 | | |
| |||
202 | 233 | | |
203 | 234 | | |
204 | 235 | | |
| 236 | + | |
205 | 237 | | |
206 | 238 | | |
207 | 239 | | |
| |||
223 | 255 | | |
224 | 256 | | |
225 | 257 | | |
226 | | - | |
| 258 | + | |
227 | 259 | | |
228 | 260 | | |
229 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
230 | 266 | | |
231 | 267 | | |
232 | 268 | | |
| |||
280 | 316 | | |
281 | 317 | | |
282 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
283 | 322 | | |
284 | 323 | | |
285 | 324 | | |
| |||
323 | 362 | | |
324 | 363 | | |
325 | 364 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
333 | 372 | | |
334 | 373 | | |
335 | 374 | | |
| |||
559 | 598 | | |
560 | 599 | | |
561 | 600 | | |
562 | | - | |
563 | | - | |
| 601 | + | |
564 | 602 | | |
565 | 603 | | |
566 | 604 | | |
567 | 605 | | |
568 | 606 | | |
569 | 607 | | |
570 | | - | |
| 608 | + | |
571 | 609 | | |
572 | 610 | | |
573 | 611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
113 | 130 | | |
114 | 131 | | |
115 | 132 | | |
| |||
120 | 137 | | |
121 | 138 | | |
122 | 139 | | |
123 | | - | |
| 140 | + | |
124 | 141 | | |
125 | 142 | | |
126 | 143 | | |
| |||
137 | 154 | | |
138 | 155 | | |
139 | 156 | | |
140 | | - | |
| 157 | + | |
141 | 158 | | |
142 | 159 | | |
143 | 160 | | |
| |||
154 | 171 | | |
155 | 172 | | |
156 | 173 | | |
157 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
158 | 192 | | |
159 | 193 | | |
160 | 194 | | |
| |||
171 | 205 | | |
172 | 206 | | |
173 | 207 | | |
174 | | - | |
| 208 | + | |
175 | 209 | | |
176 | 210 | | |
177 | 211 | | |
| |||
188 | 222 | | |
189 | 223 | | |
190 | 224 | | |
191 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
192 | 243 | | |
193 | 244 | | |
194 | 245 | | |
| |||
205 | 256 | | |
206 | 257 | | |
207 | 258 | | |
208 | | - | |
| 259 | + | |
209 | 260 | | |
210 | 261 | | |
211 | 262 | | |
| |||
222 | 273 | | |
223 | 274 | | |
224 | 275 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
44 | 61 | | |
45 | 62 | | |
46 | 63 | | |
| |||
52 | 69 | | |
53 | 70 | | |
54 | 71 | | |
55 | | - | |
| 72 | + | |
56 | 73 | | |
57 | 74 | | |
58 | 75 | | |
59 | 76 | | |
60 | 77 | | |
61 | 78 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
67 | 84 | | |
68 | 85 | | |
69 | 86 | | |
70 | | - | |
| 87 | + | |
71 | 88 | | |
72 | | - | |
| 89 | + | |
73 | 90 | | |
74 | 91 | | |
75 | 92 | | |
76 | 93 | | |
77 | 94 | | |
78 | 95 | | |
79 | 96 | | |
80 | | - | |
| 97 | + | |
81 | 98 | | |
82 | | - | |
| 99 | + | |
83 | 100 | | |
84 | 101 | | |
85 | 102 | | |
86 | 103 | | |
87 | | - | |
| 104 | + | |
88 | 105 | | |
89 | | - | |
| 106 | + | |
90 | 107 | | |
91 | 108 | | |
92 | 109 | | |
| |||
103 | 120 | | |
104 | 121 | | |
105 | 122 | | |
106 | | - | |
| 123 | + | |
107 | 124 | | |
108 | 125 | | |
109 | 126 | | |
| |||
0 commit comments