mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We already had this functionality in the FixitApplyDiagnosticConsumer, but we also need it in the AST passes because different entries in the API diff data may drive identical fix-its, namely a general type rename, which can occur anywhere a DeclRef appears, but also for function overrides' parameter type changes, which are context specific. rdar://problem/32431533
15 lines
572 B
Plaintext
15 lines
572 B
Plaintext
// REQUIRES: OS=macosx
|
|
// REQUIRES: objc_interop
|
|
// RUN: %target-swift-frontend -typecheck %s -F %S/mock-sdk -swift-version 3
|
|
// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -c -F %S/mock-sdk -api-diff-data-file %S/DoubleEditAPI.json -update-code -primary-file %s -emit-migrated-file-path %t/no_double_edit_ast_pass.result -swift-version 3 -o /dev/null
|
|
// RUN: diff -u %s.expected %t/no_double_edit_ast_pass.result
|
|
|
|
import Bar
|
|
|
|
class Derived : WillOverrideWithTypeChange {
|
|
func doThing(_ thing: ItemSet.some) -> ItemSet.some {
|
|
return SomeItemSet()
|
|
}
|
|
}
|
|
|