Skip to content

Incorrect Sample on Sample Site #47

@TheApApp

Description

@TheApApp

In the Sample Site an ordered list is defined as

List {
    "This is the first list item"
    "This is the second one"
    "And here's one more"
}
.listStyle(.ordered(.default))

When testing that on my own site I got the following error:

Building for debugging...
[0/3] Write swift-version--58304C5D6DBC2206.txt
[2/5] Emitting module IgniteStarter
[3/5] Compiling IgniteStarter GreetingTracker.swift
Sites/mysite/Sources/Pages/Apps/GreetingTracker.swift:41:21: error: type 'List.Style' has no member 'ordered'
39 |             "Finally, you add cards to the recipient. This will, overtime, give you a single view of all the cards you've sent to that person."
40 |         }
41 |         .listStyle(.ordered(.default))
   |                     `- error: type 'List.Style' has no member 'ordered'
42 |
43 |         Text("""

Sites/mysite/Sources/Pages/Apps/GreetingTracker.swift:41:30: error: cannot infer contextual base in reference to member 'default'
39 |             "Finally, you add cards to the recipient. This will, overtime, give you a single view of all the cards you've sent to that person."
40 |         }
41 |         .listStyle(.ordered(.default))
   |                              `- error: cannot infer contextual base in reference to member 'default'

The following code works .listMarkerStyle(.ordered). Not sure if this is a code regression or a documentation issue on the sample site.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions