Files
swift-mirror/test/Migrator/pre_fixit_pass.swift
David Farler 789bd3749f [Migrator] Use toLowercaseWord to lowercase SetterToProperty changes
Post-commit review follow-up:
This works better for properties that were all-caps, such as `URL`.

Thanks @harlanhaskins for the tip!

rdar://problem/32845968
2017-06-26 12:53:15 -07:00

17 lines
500 B
Swift

// REQUIRES: objc_interop
// RUN: %empty-directory(%t) && not %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -api-diff-data-file %S/Inputs/API.json -emit-migrated-file-path %t/pre_fixit_pass.swift.result -o /dev/null
// RUN: diff -u %S/pre_fixit_pass.swift.expected %t/pre_fixit_pass.swift.result
import Bar
struct New {}
@available(*, unavailable, renamed: "New")
struct Old {}
Old()
func foo(_ a : PropertyUserInterface) {
a.setField(1)
a.setURL(1)
_ = a.field()
}