module mod2 { prefix abc; namespace "urn:cesnet:mod2"; typedef my { type leafref { path "../../top"; } } container cont { leaf ref { type my { path "../top"; // leafref cannot be restricted } } leaf top { type empty; } } leaf top { type uint8; } }