Skip to main content

recursive_generic_path

Function recursive_generic_path 

Source
pub fn recursive_generic_path(
    t: &TypeRef,
    types: &HashMap<String, Arc<TypeDecl>>,
) -> Option<RecursiveGenericPath>
Expand description

#3192: where t reaches an application of a recursive generic type (generic_record_is_recursive), as the field chain it is reached through. A recursive generic declares and works in memory but has no codec yet, so every position that serialises uses this walk. It follows named and applied types into their declarations, as stream_path does, so a record that merely contains Tree[Int] is found where the record is used. It does not enter a function type, which is refused at a boundary on its own. Terminates via the visited set.