Commit ea6ee13
committed
Fix conflict between tupleArity and tupleElementTypes
There are cases where we know the tuple arity but cannot know the
flat element types of the tuple. For example `(A, B) | (C, D)` has
arity 2 but we cannot create a single tuple containing these elements.
In tupleArity we are missing a dealias. We need to investigate this
further. At first glance it seems that the signature of `Tuple.apply(x)`
is erased to `(Object): Product` and not `(Object): Tuple1`. This would
have been caused be the missing dealias. Unfortunately, if this is the
case we might not be able to fix the erasure without breaking binary
compatibility of the standard library.1 parent 2917667 commit ea6ee13
File tree
6 files changed
+42
-37
lines changed- compiler/src/dotty/tools/dotc
- core
- printing
- transform
- typer
6 files changed
+42
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
| 694 | + | |
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| |||
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | 54 | | |
57 | | - | |
| 55 | + | |
58 | 56 | | |
59 | | - | |
| 57 | + | |
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
63 | | - | |
64 | | - | |
65 | 61 | | |
66 | | - | |
67 | | - | |
| 62 | + | |
| 63 | + | |
68 | 64 | | |
69 | 65 | | |
70 | 66 | | |
71 | 67 | | |
72 | 68 | | |
73 | 69 | | |
74 | 70 | | |
75 | | - | |
| 71 | + | |
76 | 72 | | |
77 | | - | |
| 73 | + | |
78 | 74 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
85 | 82 | | |
86 | | - | |
| 83 | + | |
| 84 | + | |
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
90 | 88 | | |
91 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | 361 | | |
367 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
368 | 370 | | |
369 | 371 | | |
370 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2768 | 2768 | | |
2769 | 2769 | | |
2770 | 2770 | | |
2771 | | - | |
2772 | | - | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
2773 | 2774 | | |
2774 | 2775 | | |
2775 | 2776 | | |
| |||
0 commit comments