The typechecker should accept this code:
T fun<T>(T x, T y)
given T of Float|Integer {
switch (pair = [x,y])
case (is [Integer,Integer]) { return pair[0]+pair[1]; }
case (is [Float,Float]) { return pair[0]+pair[1]; }
}
I'm not sure how hard this is.
Related: #560.