Skip to content

Commit 472c8ff

Browse files
authored
Fix code samples in "Upcoming Feature Flags" blog post (#341)
Using `enableUpcomingFeature(name:)` as specified in the blog post doesn't work, as this parameter doesn't have an external name. The correct use is `enableUpcomingFeature()`
1 parent a4e51ca commit 472c8ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

_posts/2023-05-30-using-upcoming-feature-flags.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For example, to enable the upcoming Regex literal syntax you would use:
5656
```
5757
In Swift Package Manager manifests you specify these using a new `SwiftSetting`:
5858
```swift
59-
.enableUpcomingFeature(name: "BareSlashRegexLiterals")
59+
.enableUpcomingFeature("BareSlashRegexLiterals")
6060
```
6161
### Checking For Features In Code
6262

@@ -126,9 +126,9 @@ For a Swift package, enable upcoming features for a target in its `SwiftSetting`
126126
.target(name: "MyTarget",
127127
dependencies:[.fancyLibrary],
128128
swiftSettings:
129-
[.enableUpcomingFeature(name: “ConciseMagicFile”),
130-
.enableUpcomingFeature(name: “BareSlashRegexLiterals”),
131-
.enableUpcomingFeature(name: “ExistentialAny”)])
129+
[.enableUpcomingFeature(“ConciseMagicFile”),
130+
.enableUpcomingFeature(“BareSlashRegexLiterals”),
131+
.enableUpcomingFeature(“ExistentialAny”)])
132132
```
133133
You will also need to update the tools version specified in the manifest to 5.8 or later:
134134
```swift

0 commit comments

Comments
 (0)