Use function_type::classify
for yield-in-init
#2742
Merged
function_type::classify
for yield-in-init
#2742