Hi,
A selector f may denote a field or method f of a type T, or it may refer to a field or method f of a nested embedded field of T. The number of embedded fields traversed to reach f is called its depth in T. The depth of a field or method f declared in T is zero. The depth of a field or method f declared in an embedded field A in T is the depth of f in A plus one.
and
For a value x of type T or *T where T is not a pointer or interface type, x.f denotes the field or method at the shallowest depth in T where there is such an f. If there is not exactly one f with shallowest depth, the selector expression is illegal.
In your example, zz.Fun refers to zz.Y.Fun, as that has a depth of 1, whereas zz.Q.Fun has a depth of 2 (Q has depth 1 and Fun has depth 1 within Q) and zz.X.Fun (X has depth 2 in Z and Fun has depth 0 in X).
Note, in particular, that the check happens at the selector expression, not at the type-definition. This is intentional, as it means you can embed multiple types without it being an error if they have the same fields/methods.
I agree that all of this makes not necessarily for the most readable code, but the rule that the shallowest depth must be unique is what makes the selector well-defined.