Error codes · Check is build

PW6601

executable_program

The program must hold to this: a semantically valid program is supported by the compiler's executable backends.

A program the compiler refuses with it

Refused: PW6601
module shop.titled

page Counter() {
    route "/counter"
    cache private

    signal count: Int = 0

    view {
        <title>Pressed {count}</title>
        <button type="button" on:press={() => count = count + 1}>Press</button>
    }
}

From Where pw check stops, in Pages. A test holds the guide's examples to the compiler.

Refused: PW6601
module shop.computed_head

type Item = Item { name: String }

fn items() -> List<Item> !{} {
    [Item { name: "Tea" }]
}

view Menu() !{} {
    <ul>
        {#each items() as item (item.name)}
            <li>{item.name}</li>
        {/each}
    </ul>
}

From Where pw check stops, in Pages. A test holds the guide's examples to the compiler.

Reading the diagnostic

pw check prints the code in brackets, [PW6601], with the sentence above and the place in your program. Errors and diagnostics explains how to read one, and every code is listed with its rule.