module main pub struct Tree {} pub fn (tree &Tree) str() string { return '' } pub struct TreeTwo { Tree } pub fn TreeTwo.from_string(tree_string string) !&TreeTwo { return &TreeTwo{} } fn main() { tree := TreeTwo.from_string('') or { panic(err) } println(tree.str()) }