scala/scala — pull request #1057 by xeno-by (2012-08-05 20:50:06+00:00)
Title: first step in making mirrors work with primitives  

mirrors now carry a class tag of the receiver, so that they can detect
value classes being reflected upon and adjust accordingly (e.g. allow
Int_+ for ints, but disallow it for Integers). This is a first step
in fixing SI-6179.

However magic methods on primitives (e.g. Int_+ or Boolean_||) are not
implemented yet. There are a lot of them, and bruteforce solution
would produce a lot of code. Hence we'd better take time to think of a
better way to do it. Anyhow this commit is an improvement, because
it replaces a cryptic error message with a clearly stated error.

Suprisingly enough derived value classes (SIP-15 guys that inherit from AnyVal)
have been working all along, so no modification were required to fix them.