Skip to content
ZOLO / TE102 Type · error

struct has no such field

The struct does not declare this field. "Did you mean?" suggestions are attached for near-matches.

Why this fires

A .field access named a field that doesn't exist on the receiver's struct type. Concrete causes:

  • A typo (.nmae instead of .name).
  • The field was renamed or removed.
  • The receiver's type was inferred as a different struct than expected.
struct User { name: str, age: int }

fn greet(u: User) {
    print(u.nmae)
    //      ^^^^ error[TE102]: struct 'User' has no field 'nmae'. Did you mean 'name'?
}

Fix it

1. Fix the spelling

Trust the "did you mean?" suggestion when it appears.

fn greet(u: User) {
    print(u.name)           // fixed
}

2. Check the receiver's actual type

If the field genuinely doesn't exist, confirm the receiver is the struct you think it is — an explicit annotation or hovering the value in the editor will confirm.

See also

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

enespt-br