I was looking in TypeHelper at
public static ITypeDefinition MergedType(ITypeDefinition type1, ITypeDefinition type2)
in the hope that it was used behind-the-scenes of Emit calls, to automatically insert the casts that keep peverify happy. No chance, right?
Failing that, is there some utility in ccimetadata to compute type-stacks at each instruction point? Some framework for iterative dataflow?