Skip to content

Commit 28c27f4

Browse files
no nested protocol for you
1 parent 274973c commit 28c27f4

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
test-macos:
1111
runs-on: macos-13
1212
env:
13-
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
13+
DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer
1414
steps:
1515
- uses: actions/checkout@v3
1616
- name: Build
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-22.04
2222
strategy:
2323
matrix:
24-
swift: [5.10]
24+
swift: [5.9]
2525
container: swift:${{ matrix.swift }}
2626
steps:
2727
- uses: actions/checkout@v3

PapyrusPlugin/Sources/Models/Declaration.swift

+7-7
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,7 @@ extension Declaration {
151151

152152
@resultBuilder
153153
struct DeclarationsBuilder {
154-
protocol Block {
155-
var declarations: [Declaration] { get }
156-
}
157-
158-
static func buildBlock(_ components: Block...) -> [Declaration] {
154+
static func buildBlock(_ components: DeclarationBuilderBlock...) -> [Declaration] {
159155
components.flatMap(\.declarations)
160156
}
161157

@@ -210,10 +206,14 @@ struct DeclarationsBuilder {
210206
}
211207
}
212208

213-
extension Declaration: DeclarationsBuilder.Block {
209+
protocol DeclarationBuilderBlock {
210+
var declarations: [Declaration] { get }
211+
}
212+
213+
extension Declaration: DeclarationBuilderBlock {
214214
var declarations: [Declaration] { [self] }
215215
}
216216

217-
extension [Declaration]: DeclarationsBuilder.Block {
217+
extension [Declaration]: DeclarationBuilderBlock {
218218
var declarations: [Declaration] { self }
219219
}

0 commit comments

Comments
 (0)