On Friday, 15 March 2019 at 21:35:12 UTC, eXodiquas wrote: > Is there any way to achive this behaivour with D2? Yep. Just make the return type in the function declaration `auto`. You are then free to return a different type in each static branch.