Commit 6b04f15
committed
Tighten condition when to emit a "unary method cannot have parameters" warning
Also, use a more precise term in the error message. Unary method generally means
something entirely different!
Generally, was it really worth it to go into so much trouble for a warning
for an edge case? The previous fix overshot, excluding things that
are OK. I still believe it would have been better to do nothing aboit #9142.
The time we have already spent on this and the number of code lines we use to
address the issue is in no relation to the benefit of the fix.1 parent 5939849 commit 6b04f15
File tree
2 files changed
+9
-2
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/neg-custom-args/fatal-warnings
2 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1039 | 1039 | | |
1040 | 1040 | | |
1041 | 1041 | | |
1042 | | - | |
| 1042 | + | |
1043 | 1043 | | |
1044 | 1044 | | |
1045 | 1045 | | |
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | | - | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
1061 | 1067 | | |
1062 | 1068 | | |
1063 | 1069 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
0 commit comments