emit case test/thens casts unboxed