mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Previously, we only handle dot syntax call expression for qualified replacement, i.e. changing from A.a to B.b. This patch teaches the tool to handle the migration of member reference expression tool.
16 lines
807 B
Swift
16 lines
807 B
Swift
// REQUIRES: objc_interop
|
|
// RUN: %empty-directory(%t.mod)
|
|
// RUN: %target-swift-frontend -emit-module -o %t.mod/Cities.swiftmodule %S/Inputs/Cities.swift -module-name Cities -parse-as-library
|
|
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -I %t.mod -api-diff-data-file %S/Inputs/qualified.json -emit-migrated-file-path %t/qualified-replacement.swift.result -emit-remap-file-path %t/qualified-replacement.swift.remap -o /dev/null
|
|
// RUN: diff -u %S/qualified-replacement.swift.expected %t/qualified-replacement.swift.result
|
|
|
|
import Cities
|
|
import Bar
|
|
func foo() {
|
|
_ = PropertyUserInterface.fieldPlus
|
|
PropertyUserInterface.methodPlus(1)
|
|
_ = FooComparisonResult.orderedSame
|
|
let _ : FooComparisonResult = .orderedSame
|
|
_ = Cities.CityKind.Town
|
|
}
|