Skip to content

Commit f6e7837

Browse files
committed
Swift: Extend the PrintAST test as well.
1 parent 0c900e4 commit f6e7837

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

swift/ql/test/library-tests/ast/PrintAst.expected

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4218,6 +4218,20 @@ declarations.swift:
42184218
# 173| getElement(5): [IfConfigDecl] #if ...
42194219
# 174| getElement(6): [IntegerLiteralExpr] 9
42204220
# 175| getElement(7): [IntegerLiteralExpr] 10
4221+
# 182| [ClassDecl] B
4222+
# 182| getMember(0): [DestructorDecl] B.deinit()
4223+
# 182| InterfaceType = (B) -> () -> ()
4224+
# 182| getSelfParam(): [ParamDecl] self
4225+
# 182| Type = B
4226+
# 182| getBody(): [BraceStmt] { ... }
4227+
# 182| getMember(1): [ConstructorDecl] B.init()
4228+
# 182| InterfaceType = (B.Type) -> () -> B
4229+
# 182| getSelfParam(): [ParamDecl] self
4230+
# 182| Type = B
4231+
# 182| getBody(): [BraceStmt] { ... }
4232+
# 182| getElement(0): [ReturnStmt] return
4233+
# 183| [TypeAliasDecl] A
4234+
# 184| [TypeAliasDecl] C
42214235
expressions.swift:
42224236
# 1| [TopLevelCodeDecl] { ... }
42234237
# 1| getBody(): [BraceStmt] { ... }

swift/ql/test/library-tests/ast/declarations.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,7 @@ func ifConfig() {
178178
12
179179
#endif
180180
}
181+
182+
class B {}
183+
typealias A = B
184+
typealias C = Int?

0 commit comments

Comments
 (0)