Skip to content

Commit afbc672

Browse files
hvitvedCopilot
andcommitted
unified: Test bodyless Swift function modifiers
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a6b63a0 commit afbc672

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

unified/extractor/tests/corpus/swift/types/protocol-declaration.output

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
protocol Drawable {
22
func draw()
3+
static func make()
34
}
45

56
---
@@ -31,6 +32,22 @@ sourceFile
3132
rightParen: )
3233
parameters:
3334
funcKeyword: func
35+
memberBlockItem
36+
decl:
37+
functionDecl
38+
attributes:
39+
name: identifier "make"
40+
modifiers:
41+
declModifier
42+
name: static
43+
signature:
44+
functionSignature
45+
parameterClause:
46+
functionParameterClause
47+
leftParen: (
48+
rightParen: )
49+
parameters:
50+
funcKeyword: func
3451
modifiers:
3552
protocolKeyword: protocol
3653

@@ -47,3 +64,7 @@ top_level
4764
function_declaration
4865
name: identifier "draw"
4966
body: block "func draw()"
67+
function_declaration
68+
modifier: modifier "static"
69+
name: identifier "make"
70+
body: block "static func make()"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
protocol Drawable {
22
func draw()
3+
static func make()
34
}

0 commit comments

Comments
 (0)