This is my very first issue submission to Scala, so I apologize in advance for any mistakes I might have made in filling out the different fields.
Calling toHexString method on numeric types other than Int will produce unexpected output. I believe that toHexString is not implemented in Byte and Short and an implicit conversion to Int is happening.
scala> -1.toByte.toHexString
res2: String = ffffffff
// should be "ff"
scala> -1.toShort.toHexString
res3: String = ffffffff
// should be "ffff"
scala> -1.toHexString
res4: String = ffffffff
// is correct
scala> -1.toLong.toHexString
res5: String = ffffffffffffffff
// is correct