scala/scala — pull request #1054 by xeno-by (2012-08-04 16:54:03+00:00)
Title: multiple fixes for java mirrors  

First of all in 911bbc4fdd I've completely overlooked the fact that
reflectConstructor exists and that is also needs sanity checks.

Now reflectConstructor checks that the incoming symbol is actually a ctor,
and that it is actually a ctor of the class reflected by the current mirror.

Secondly while fixing reflectConstructor I've found out that reflectXXX methods
don't accept inherited, but overriden members. That's also fixed now.

Haha that was a nice one. After a fixed the problem with inherited members,
I've uncovered another issue. If we have a field overriden in a descendant,
then (unlike with methods) overriding and overriden members make sense
independently of each other. Hence in `FieldMirror.get` we need some way
of specifying whether we want the base value or the overriding value.
To do that I introduced an optional parameter. Luckily we don't need to change
`FieldMirror.set` because vars cannot be overriden.