I think it is UB rather than a bug. The spec says that return types must match exactly. AFAIK auto is a feature to infer return type, not to magically adjust to multiple incompatible types.
I'd be surprised if this were not a bug. My expectation would be that the types be combined as with the ?: operator, just like std.traits.CommonType.If this is not a bug, it's certainly worth filing as an enhancement request.
-- Simen
