Commit 20d3025
authored
Adds a convenience for mapping Never outputs to other types (#340)
Adds a way to map a workflow's `Never` output type to a different type
without generating compiler warnings. Fixes
#339
I like this solution because the natural inclination is to simply delete
the block containing unreachable code and that just works:
```diff
- .mapOutput { switch $0 {} }
+ .mapOutput()
```
I'm happy to add a test using this but the true validation is to
successfully build without warnings.1 parent 3fa55ff commit 20d3025
File tree
2 files changed
+28
-0
lines changed- Workflow
- Sources
- Tests
2 files changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
85 | 92 | | |
86 | 93 | | |
87 | 94 | | |
| |||
150 | 157 | | |
151 | 158 | | |
152 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
0 commit comments