Skip to content

Commit 3682476

Browse files
authored
swift-api-digester: consider name alias type as a standalone node kind. (#5701)
* swift-api-digester: consider name alias type as a standalone node kind. * [test] Update the swift-api-digester dump for stdlib to honor new name alias node.
1 parent a1dbe06 commit 3682476

File tree

5 files changed

+1925
-394
lines changed

5 files changed

+1925
-394
lines changed

test/api-digester/Inputs/cake.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ public struct S1 {
44
internal func foo3() {}
55
private func foo4() {}
66
fileprivate func foo5() {}
7+
public func foo6() -> Void {}
78
}
89

910
public class C1 {

test/api-digester/Outputs/cake.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,29 @@
4646
}
4747
]
4848
},
49+
{
50+
"kind": "Function",
51+
"name": "foo6",
52+
"printedName": "foo6()",
53+
"declKind": "Func",
54+
"usr": "s:FV4cake2S14foo6FT_T_",
55+
"location": "",
56+
"moduleName": "cake",
57+
"children": [
58+
{
59+
"kind": "TypeNameAlias",
60+
"name": "Void",
61+
"printedName": "Void",
62+
"children": [
63+
{
64+
"kind": "TypeNominal",
65+
"name": "Void",
66+
"printedName": "()"
67+
}
68+
]
69+
}
70+
]
71+
},
4972
{
5073
"kind": "Constructor",
5174
"name": "init",

0 commit comments

Comments
 (0)