Commit adc9cc9
committed
[CodeComplete] Prefer function call if both reference and call are possible
The real-world use case here is the `Task` initializer in the added test case. In general, we should only prefer to insert an unapplied function reference if it has a better type relation than calling the function because, in most cases, you want to call functions and not get unapplied references to them.
rdar://904561051 parent 9b10ab3 commit adc9cc9
File tree
2 files changed
+34
-3
lines changed- lib/IDE
- test/IDE
2 files changed
+34
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1972 | 1972 | | |
1973 | 1973 | | |
1974 | 1974 | | |
1975 | | - | |
| 1975 | + | |
1976 | 1976 | | |
1977 | | - | |
1978 | | - | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
1979 | 1980 | | |
1980 | 1981 | | |
1981 | 1982 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments