I seem to be getting non-deterministic behaviour from `promote_op`, e.g. where the output of the function is different at the REPL, in a function and in a generated function.
Inside the function generator it sometimes works to give the correct result and sometimes returns `Any`. I haven't seen it fail at the REPL, but I'm getting test failures in StaticArrays master because of this. I'm not sure if this is one of those "not valid in a pure context" (i.e. `@pure` or `@generated`) functions as it's implementation seems to involve inference and `Generator`s and so on. Or maybe it's a bug and I should file a report? Thanks for any feedback, Andy
