Commit 3a51e88
committed
Don't allow single apply's to be used as constructor proxies
The previous commits allowed them but that caused runtime errors in Specs2 since
`apply` was bound to something different from before.
Since this is a weird corner case it's better not to allow it. As long as we do
not crash we are good.
The error message we get now is:
constructor proxy `apply` cannot be used as a value
which is also a bit strange, but since this is a truly weird corner case it's not worth it
to finetune this.1 parent 836118c commit 3a51e88
File tree
3 files changed
+10
-6
lines changed- compiler/src/dotty/tools/dotc/typer
- tests
- neg
- new
3 files changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3997 | 3997 | | |
3998 | 3998 | | |
3999 | 3999 | | |
| 4000 | + | |
| 4001 | + | |
| 4002 | + | |
| 4003 | + | |
4000 | 4004 | | |
4001 | 4005 | | |
4002 | 4006 | | |
| |||
4012 | 4016 | | |
4013 | 4017 | | |
4014 | 4018 | | |
4015 | | - | |
| 4019 | + | |
4016 | 4020 | | |
4017 | 4021 | | |
4018 | 4022 | | |
| |||
4026 | 4030 | | |
4027 | 4031 | | |
4028 | 4032 | | |
4029 | | - | |
| 4033 | + | |
4030 | 4034 | | |
4031 | 4035 | | |
4032 | 4036 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
This file was deleted.
0 commit comments