Add test for recursive functions in type definition (#105)