scala-js/scala-js — pull request #210 by sjrd (2014-02-07 15:04:12+00:00)
Title: Fix definitions of operators on js types.

(This PR took off in response to https://github.com/scala-js/scala-js/pull/207#discussion-diff-9537911)

This basically solves soundness issues by removing a lot
of definitions from js.Any, and move them down to specific
subtypes. For example, && and || are restricted to Booleans,
and unary + - ~ are restricted to Numbers.

Although JavaScript guarantees that +x will return a number
for any type of value x, Scala.js should not consider this
to be type-safe. Note that +x is still allowed on js.Dynamic,
and returns a js.Number. The same reasoning applies to other
operators.

This also adds the comparison operators to js.Number and
js.Dynamic.