swiftlang / swift-book

The Swift Programming Language book
Apache License 2.0
1.76k stars 162 forks source link

Fix prose to match code listing for opaque type #280

Closed Alc-Alc closed 9 months ago

Alc-Alc commented 9 months ago

The third code block in this section of the docs has the following declaration.

let joinedTriangles = JoinedShape(top: smallTriangle, bottom: flippedTriangle)

In the paragraph above the declaration, the docs mentions the following.

results in types like JoinedShape<FlippedShape<Triangle>, Triangle>

However, the actual dynamic type is JoinedShape<Triangle, FlippedShape<Triangle>>. This PR suggests rephrasing the sentence to match the actual dynamic type.