Files
swift-mirror/test/refactoring/SyntacticRename/init.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

17 lines
495 B
Swift

struct Test {
var base: Int
/*test:def*/init(base: Int) {}
}
_ = /*test:call*/Test(base: 3)
_ = Test . /*test:call*/init(base: 3)
_ = Test . /*test:ref*/init
_ = Test . /*test:ref*/init(base:)
// REQUIRES: swift_swift_parser
// RUN: %empty-directory(%t.ranges)
// RUN: %refactor -find-rename-ranges -source-filename %s -pos="test" -is-function-like -old-name "init(base:)" >> %t.ranges/init.swift.expected
// RUN: diff -u %S/Outputs/init.swift.expected %t.ranges/init.swift.expected