The value is a T? and may be missing, so it has no fields of its own. Auk makes the missing
case explicit: chain with ?. and give a fallback, or unwrap first.
Wrong#
struct P { x: int }
fn get(p: P?): int = p.xFixed#
struct P { x: int }
fn get(p: P?): int = p?.x else 0Common causes#
- A lookup (
find,get,first) returnsT?: use?.,?,elseormatch. x?.fworks onT?only; forT!write(x?).f.