Commit 00badaa
committed
Avoid awkward special cases when type mapping AnnotatedTypes
A TypeMap previously mapped the annotation only if it returned a different
result for the parent type. There is no good reason for this behavior. We
now map always, but allow the mapping operation to be defined in the annotation.
The change uncovers a bug illustrated in annotDepMethType.scala, which is fixed
in the next commit.1 parent 8e06c68 commit 00badaa
File tree
4 files changed
+41
-16
lines changed- compiler/src/dotty/tools/dotc
- ast
- core
4 files changed
+41
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
49 | 70 | | |
50 | 71 | | |
51 | 72 | | |
| |||
200 | 221 | | |
201 | 222 | | |
202 | 223 | | |
| 224 | + | |
| 225 | + | |
203 | 226 | | |
204 | 227 | | |
205 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5380 | 5380 | | |
5381 | 5381 | | |
5382 | 5382 | | |
| 5383 | + | |
| 5384 | + | |
5383 | 5385 | | |
5384 | 5386 | | |
5385 | 5387 | | |
| |||
5423 | 5425 | | |
5424 | 5426 | | |
5425 | 5427 | | |
5426 | | - | |
5427 | | - | |
| 5428 | + | |
| 5429 | + | |
| 5430 | + | |
5428 | 5431 | | |
5429 | 5432 | | |
5430 | 5433 | | |
| |||
5496 | 5499 | | |
5497 | 5500 | | |
5498 | 5501 | | |
5499 | | - | |
5500 | | - | |
5501 | | - | |
5502 | 5502 | | |
5503 | 5503 | | |
5504 | 5504 | | |
| |||
5545 | 5545 | | |
5546 | 5546 | | |
5547 | 5547 | | |
5548 | | - | |
5549 | | - | |
5550 | 5548 | | |
5551 | 5549 | | |
5552 | 5550 | | |
| |||
0 commit comments