Skip to content

Commit 5c706ee

Browse files
committed
fix trait syntax
1 parent 0608959 commit 5c706ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

proposals/0450-swiftpm-package-traits.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ let package = Package(
7575
enabledTraits: [ // Other traits that are enabled when this trait is being enabled
7676
"Foo",
7777
]
78-
)
78+
),
7979
.trait(
8080
name: "FooBar",
8181
enabledTraits: [
@@ -92,7 +92,7 @@ let package = Package(
9292
When depending on a package the `default` trait is enabled. However, the enabled
9393
traits can be customized by passing a set of enabled traits when declaring the
9494
dependency. When specifying the enabled traits of the dependencies the
95-
`.default` trait can be passed which will enable the default trait. The below
95+
`.defaults` trait can be passed which will enable the default trait. The below
9696
example enables the default trait and the additional `SomeTrait` of the package.
9797

9898
```swift
@@ -101,7 +101,7 @@ dependencies: [
101101
url: "https://github.com/Org/SomePackage.git",
102102
from: "1.0.0",
103103
traits: [
104-
.default,
104+
.defaults,
105105
"SomeTrait"
106106
]
107107
),
@@ -130,7 +130,7 @@ dependencies: [
130130
url: "https://github.com/Org/SomePackage.git",
131131
from: "1.0.0",
132132
traits:[
133-
.trait("SomeOtherTrait", condition: .when(traits: ["Foo"])),
133+
.trait(name: "SomeOtherTrait", condition: .when(traits: ["Foo"])),
134134
]
135135
),
136136
]

0 commit comments

Comments
 (0)