cppgen: fix for wrong type in child of case