Files
swift-mirror/test/SourceKit/RelatedIdents/self.swift
Alex Hoppen f0ea24dd29 [SourceKit] Fix a crash when performing related identifers request on self
Performing a related identifiers request on `self` returns an empty result because `self` is not an identifier. We thus can’t retrieve the first location to compute the old name.

rdar://121668042
2024-01-29 15:51:27 -08:00

10 lines
183 B
Swift

struct Test {
func foo() {
// RUN: %sourcekitd-test -req=related-idents -pos=%(line + 1):6 %s -- %s | %FileCheck %s
self
}
}
// CHECK: START RANGES
// CHECK-NEXT: END RANGES