List(\"a\").contains(5)
Because an Int can never be contained in a list of String
This sounds good in theory, but falls apart in real life in my opinion.
equals is not based on types and contains is building on top of that.
That's why code like 1 == BigInt(1) works and returns the result most people would expect.
In my opinion it doesn't make sense to make contains more strict than equals.
If contains would be made more strict, code like List[BigInt](1,2,3) contains 1 would stop working completely.
I don't think “unsafe” or “not type safe” are the right terms here, by the way.