T05
Error
Types
T05 — A field or method that does not exist
A record, a map literal or a built-in value read for a field or method it does not have.
What the compiler said
error[T05]: `User` has no field `nmae` --> src/App.wf:4:18 | 4 | Heading(user.nmae).h1 | ^^^^ = help: Did you mean `name`? Its fields are `name` = docs: https://webfluent.monzeromer.dev/errors/T05
Your editor offers this fix: Change to name. wf fix --code T05 applies it to every place it fits.
The fix
Broken
type User { name: String }
page P(path: "/", title: "T", description: "D") {
state user = User(name: "Ada")
Heading(user.nmae).h1
}
Fixed
type User { name: String }
page P(path: "/", title: "T", description: "D") {
state user = User(name: "Ada")
Heading(user.name).h1
}
Correct the spelling to one of the fields listed, or add the field to the type.
Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).
lints cannot lower it: it would ship a broken page.