Commit 5b0b2c9
authored
Skip splice level checking for <refinement> symbols (#22782)
This is safe to skip because <refinement> symbols can only be a part of
type refinement self referencing prefix, where it is impossible to
splice anything.
For some context, this is how the test case looks in typer:
```scala
{
final class $anon() extends AnyRef() {
type T = Unit
def make: T = ()
def take(t: T): Unit = ()
}
new $anon():
{z1 => Object{type T; def make: z1.T; def take(t: z1.T): Unit}}
}:
Object
{
type T >: Nothing <: Any
def make: <refinement>.this.T
def take(t: <refinement>.this.T): Unit
}
```
The compiler sometimes instead of creating a recursive type directly
(`{z1 => ...}`), creates <refinement> symbols which reference an
enclosing refinement, replacing those with recursive types later.
Fixes #22648File tree
2 files changed
+15
-1
lines changed- compiler/src/dotty/tools/dotc/staging
- tests/pos
2 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments