Closed bwetherfield closed 4 years ago
If this change goes through, and anyone, like us, find that a bunch of explicit CodingKey
implementations are now needed (where before you just set-and-forgot a variable let value: String
, for example), you may find this template helpful (for use with Sourcery).
@bwetherfield thanks for the PR!
Overview
Restricts the special case usage of
"value"
OR""
as a coding key, as implemented in #73 to just""
."value"
resumes functioning as a normal coding key.Example
As noted in #145,
"value"
is starting to collide awkwardly in one or two cases where it may be implicit per the special case usageor explicit, as in
With the change proposed, the latter example will be unambiguously captured by
while the former is equivalent to
Source Compatability
This is a breaking change for downstream users of the special
"value"
coding key. All such uses should be replaced bycase value = ""
subject to this PR's inclusion.