Files
swift-mirror/test/SourceKit/CursorInfo/rdar131135631.swift
Hamish Knight 9da87d1b1c [CursorInfo] Resolve solver-based in VarDecls
Previously we would skip resolving any solver-based
cursor info in a VarDecl accessor as the VarDecl
source range does not encompass the AccessorDecl.
Avoid looking at the VarDecl source range in this
case.

rdar://131135631
2024-07-04 22:49:46 +01:00

13 lines
391 B
Swift

func foo(_ x: Int) -> Int {}
func foo(_ x: String) -> Int {}
// rdar://131135631 - Make sure we can resolve solver-based cursor info in a
// VarDecl's accessor.
var x: Int {
// RUN: %sourcekitd-test -req=cursor -pos=%(line + 1):3 %s -- %s | %FileCheck %s
foo()
}
// CHECK-DAG: source.lang.swift.ref.function.free (1:6-1:19)
// CHECK-DAG: source.lang.swift.ref.function.free (2:6-2:22)