You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assign to properties with explicit self in init(from decoder:) (#696)
### Motivation
Our generated `init(from decoder:)` assigns to properties without using
explicit self. This is a problem because it can produce conflicts with
the local variables created in the initializer, e.g. the decoding
container, which will then fail to compile for schemas with properties
named `container`, as found by an adopter in #695.
We should probably take a broader pass with regard to the use of
explicit self in our generated code, but for now we can resolve this by
focussing on this problematic generation, where a schema with named and
additional properties.
### Modifications
- Assign to properties with explicit self in `init(from decoder:)`
### Result
- Fixes#695.
### Test Plan
- Add a snippet test.
- Update the reference tests.
0 commit comments