Files
swift-mirror/test/SourceKit/CursorInfo/rdar_34348776.swift
Ben Barham 8128450690 [CursorInfo] Always add module name to response
To simplify clients, have the cursorinfo result be consistent whether
requesting a symbol within the current module or not, ie. do not skip
adding the module name.

Resolves rdar://77003299
2021-10-22 12:35:53 +10:00

16 lines
788 B
Swift

public struct MyStruct<T> {}
public typealias Alias<T> = MyStruct<T>
public typealias Aliased = Alias
// RUN: %sourcekitd-test -req=cursor -pos=3:18 %s -- %s -module-name AliasTest | %FileCheck %s
// CHECK: source.lang.swift.decl.typealias (3:18-3:25)
// CHECK-NEXT: Aliased
// CHECK-NEXT: s:9AliasTest7Aliaseda
// CHECK-NEXT: source.lang.swift
// CHECK-NEXT: Alias.Type
// CHECK-NEXT: $s9AliasTest0A0amD
// CHECK-NEXT: AliasTest{{$}}
// CHECK-NEXT: <Declaration>public typealias Aliased = <Type usr="s:9AliasTest0A0a">Alias</Type></Declaration>
// CHECK-NEXT: <decl.typealias><syntaxtype.keyword>public</syntaxtype.keyword> <syntaxtype.keyword>typealias</syntaxtype.keyword> <decl.name>Aliased</decl.name> = <ref.typealias usr="s:9AliasTest0A0a">Alias</ref.typealias></decl.typealias>