About: invalidField
This error indicates that an expression containing a dot followed by an identifier was encountered, and that it wasn't possible to understand the identifier as a field.
Lean's field notation is very powerful, but this can also make it confusing: the expression
color.value can either be a single identifier.
it can be a reference to the field of a structure, and it
and be a calling a function on the value color with
generalized field notation.
Examples
Incorrect Field Name
Projecting from the Wrong Expression
The type of the expression before the dot entirely determines the function being called by the field
projection. There is no Char.leftpad, and the only way to invoke List.leftpad with generalized
field notation is to have the list come before the dot.