File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
test/SourceKit/Refactoring Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -8843,7 +8843,7 @@ void swift::ide::collectRenameAvailabilityInfo(
8843
8843
AvailKind = RenameAvailableKind::Unavailable_system_symbol;
8844
8844
} else if (VD->getClangDecl ()) {
8845
8845
AvailKind = RenameAvailableKind::Unavailable_decl_from_clang;
8846
- } else if (VD->getStartLoc ().isInvalid ()) {
8846
+ } else if (VD->getLoc ().isInvalid ()) {
8847
8847
AvailKind = RenameAvailableKind::Unavailable_has_no_location;
8848
8848
} else if (!VD->hasName ()) {
8849
8849
AvailKind = RenameAvailableKind::Unavailable_has_no_name;
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %empty-directory(%t/build)
3
+ // RUN: split-file --leading-lines %s %t
4
+
5
+ // RUN: %target-swift-frontend -emit-module -module-name MyModule -emit-module-path %t/build/MyModule.swiftmodule -emit-module-source-info-path %t/build/MyModule.swiftsourceinfo %t/Action.swift
6
+
7
+ //--- Action.swift
8
+ public protocol Action { }
9
+
10
+ //--- test.swift
11
+ import MyModule
12
+
13
+ // RUN: %sourcekitd-test -req=cursor -pos=%(line+1):19 -length=6 -cursor-action %t/test.swift -- %t/test.swift -I %t/build | %FileCheck %s
14
+ func test( action: Action ) { }
15
+ // CHECK: ACTIONS BEGIN
16
+ // CHECK-NEXT: source.refactoring.kind.rename.global
17
+ // CHECK-NEXT: Global Rename
18
+ // CHECK-NOT: cannot be renamed
You can’t perform that action at this time.
0 commit comments