Type instability in list comprehensions

It’s perhaps worth noting that harmless use of Core.Compiler.return_type is possible. The rule is to use it for optimizations only and ensure that your function’s return value is the same regardless of what return_type gives you.

I too have a hazy memory of discussions relating to map over empty iterables and inference-dependent return values, but I thought these were also considered bugs? It’s bad because return_type can differ in its ability to infer a particular call not only between Julia versions but even within a single Julia session.