Issue 12542 - No function attribute inference for recursive functions

https://d.puremagic.com/issues/show_bug.cgi?id=12542