Files
swift-mirror/test/refactoring/rename/shorthand_shadow.swift
Alex Hoppen a710111001 [SourceKit] Support building sourcekitd without building swift-syntax
This allows building sourcekitd and swift-refactor with `SWIFT_BUILD_SWIFT_SYNTAX=NO`. In these builds, the `relatedidents` and `find-syntactic-rename-ranges` requests will always return an error.
2023-12-04 19:14:01 -08:00

13 lines
623 B
Swift

// REQUIRES: swift_swift_parser
// RUN: %refactor -find-local-rename-ranges -source-filename %s -pos=%(line+2):29 | %FileCheck %s --check-prefix=OPTIONAL
// OPTIONAL: func renameShorthandBinding(<base>opt</base>: Int?) {
func renameShorthandBinding(opt: Int?) {
// RUN: %refactor -find-local-rename-ranges -source-filename %s -pos=%(line+2):10 | %FileCheck %s --check-prefix=OPTIONAL
// OPTIONAL: if let <base>opt</base> {
if let opt {
// RUN: %refactor -find-local-rename-ranges -source-filename %s -pos=%(line+2):9 | %FileCheck %s --check-prefix=OPTIONAL
// OPTIONAL: _ = <base>opt</base>
_ = opt
}
}