type user = {name: string}
let user = Some({name: "Tests"})
let name = user.name
This leads to some variation of this error:
This has type: option<user>
But it's expected to have type: user
But, it would be much better if we could tell the user that "hey, you're trying to dot access a field of a record, but the thing you're dot accessing on is actually an option, so you need to unwrap it somehow first".