Commit b2f888e
committed
Delay widening in derivedSelect when avoiding
Using the example from `pos/i16435.avoid`:
class Foo:
type Value
def test: Option[Value] =
val scr = {
val self: Foo.this.type = this
None: Option[self.Value]
}
scr
We want avoidance to return `Option[Value]`, aka
`Option[Foo.this.Value]`, rather than widening to `Option[Any]`.
But also, widen when we're deriving to an intersection prefix...
Test cases: i16105,i16435,i2945,i8900,i8861.
And fix some kind of race condition in creating files/directories.1 parent ef653b6 commit b2f888e
File tree
5 files changed
+28
-5
lines changed- compiler/src/dotty/tools
- dotc/core
- io
- tests/pos
5 files changed
+28
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
| 507 | + | |
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
513 | 513 | | |
| 514 | + | |
| 515 | + | |
514 | 516 | | |
515 | 517 | | |
516 | 518 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5866 | 5866 | | |
5867 | 5867 | | |
5868 | 5868 | | |
5869 | | - | |
| 5869 | + | |
5870 | 5870 | | |
5871 | 5871 | | |
5872 | 5872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
264 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
265 | 267 | | |
266 | 268 | | |
267 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments