It seems clear enough to me that type is a factor in equality.
The real bug here is that .equals returns true in this case.
> Along the same lines, the docstring of = says "same as Java
> x.equals(y), except it ... compares numbers and collections in a type-
> independent manner". To me, this seems to imply the opposite of what
> actually happens with records.
There is where clarification is needed, namely that records are not
"collections" for this purpose.
Alternatively, records could have an enforced mapping {:type
TheRecordsClass} that does not actually take up storage space, but
appears when records are queried and automatically imposes the desired
equality semantics if records were simply treated as maps -- other
than that a plain map with the same type key-value pair could now
compare equal to the record. (Would that be a bad thing though?)