Commit 02181cd
committed
Fix:
The Swift 4.2 compiler doesn't like it when we overload the same function with args that differ only by optional-type (regardless whether we're compiling in Swift 3 mode, Swift 4 mode, or Swift 4.2 mode).
* Fixed by wrapping the implicit optional forms of overloads in the `#else` of an `#if (swift(>=3.4) && !swift(>=4.0)) || (swift(>=4.1.50) && !swift(>=4.2)) || swift(>=4.2)`.
▸ Under the Swift 4.2 compiler, Swift 3 mode reports itself as version 3.4, and Swift 4 mode reports itself as version 4.1.50. This statement checks if we're on Swift ≥ 3.4 (but not ≥ 4), or ≥ 4.1.50 (but not ≥ 4.2), or just ≥ 4.2, and if so excludes the overloads.#ifd-out overloaded forms when using Swift 4.2 compiler1 parent a4e1b0a commit 02181cd
1 file changed
+24
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | | - | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
93 | 102 | | |
94 | 103 | | |
95 | | - | |
| 104 | + | |
0 commit comments