summaryrefslogtreecommitdiff
path: root/test/files/run/reflection-sanitychecks.check
Commit message (Collapse)AuthorAgeFilesLines
* SI-5947 works around getDeclaredClassesEugene Burmako2012-08-081-2/+2
| | | | | | | | | | | Our name mangling scheme w.r.t stuff nested into objects conflicts with JVM's ideas of beauty, which messes up getDeclaredClasses. Scala reflection needs getDeclaredClasses to convert between Scala and Java, so the situation looked grim. Greg suggested a workaround described in: https://issues.scala-lang.org/browse/SI-4023?focusedCommentId=54759#comment-54759. Luckily the workaround worked!
* mirrors now support overriden fields and methodsEugene Burmako2012-08-061-12/+30
| | | | | | | | | | | | | | Previously `checkMemberOf` was blocking base fields and methods that are overriden in receiver.getClass. Now this is fixed. The fix also uncovered an issue with field mirrors. Currently their `get` and `set` methods don't respect overriding and always return field values from a base class. After discussing this on a reflection meeting, we decided that this behavior is desirable and that for overriding people should use reflectMethod and then apply on getters/setters. See the discussion at: https://github.com/scala/scala/pull/1054.
* sanity check for reflectConstructorEugene Burmako2012-08-061-0/+4
| | | | | | | | In 911bbc4 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.
* SI-5984 improves error reporting in JavaMirrorsEugene Burmako2012-07-191-0/+8
Factors out error raising code and introduces a special exception class for Scala reflection errors. Also adds membership sanity checks to reflectXXX. Previously reflectField, reflectMethod, reflectClass and reflectModule in InstanceMirror didn't check that the symbols being passed to them actually correspond to some member of the related class.