Commit Graph

2 Commits

Author SHA1 Message Date
Rintaro Ishizaki
1cfffb8094 [CodeSynthesis] Improve synthesized Decodable.init(from:) for enums
Since this implementation is exposed to users, we want to make it nice.

* Don't use 'unsafelyUnwrapped' which is usually not recommended to use
* Don't access 'container.allKeys' multiple times as it's a computed
  property

rdar://89150202
2022-03-08 15:56:22 -08:00
Louis D'hauwe
5d36507a2f [Refactoring] Add Codable refactoring action
Inserts the synthesized implementation.
As part of this, fix some ASTPrinter bugs.

rdar://87904700
2022-02-02 14:14:23 -08:00