Commit 80517e5
authored
Preserve type info when lifting stable arguments (#26063)
Fixes #25557
The type of lifted arguments was always widened, which affects the
behavior of `avoid` and breaks dependent path types in the `foo(parent,
isFoo)`'s result type.
```scala
{
val parent$1: ConcreteParent = ConcreteParent
ConcreteParent.foo(parent = parent$1, isFoo = true)((_$2: ConcreteParent)
=> _$2.myInner)
}
```
## How much have you relied on LLM-based tools in this contribution?
Extensively, for finding which code trigger the bug and how to fix it.
## How was the solution tested?
Used reproducer provided from the issue.1 parent faee244 commit 80517e5
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments