[Refactoring] Add Codable refactoring action

Inserts the synthesized implementation.
As part of this, fix some ASTPrinter bugs.

rdar://87904700
This commit is contained in:
Louis D'hauwe
2022-02-02 14:14:23 -08:00
parent 7ebdb8e6b4
commit 5d36507a2f
19 changed files with 558 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
// RUN: rm -rf %t.result && mkdir -p %t.result
struct Response: Codable {
let pages: [Page]
struct Page: Codable {
let results: [Result]
struct Result: Codable {
let title: String
}
}
}
// RUN: %refactor -add-explicit-codable-implementation -source-filename %s -pos=8:12 > %t.result/codable.swift
// RUN: diff -u %S/Outputs/nested/codable.swift.expected %t.result/codable.swift