Commit ac3c430
committed
Fix #6142: remove unreasonable type change for _
The logic was introduced in f618e47, which is hard to justify.
The problem is exhibited in tests/pos/i6142.scala, where
we have code lik the following:
implicit val _: scala.quoted.Type = ...
{
def $anon$ = _
closure($anon$)
}
Changing the type of `_` will break LambdLift (`_` is not free anymore),
and the compiler crashes at backend when generating code for the unfound local variable `_`,
whose symbol is `scala.quoted.Type`.1 parent 671aa3a commit ac3c430
File tree
2 files changed
+11
-4
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/pos
2 files changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
| 617 | + | |
621 | 618 | | |
622 | 619 | | |
623 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments