[Mono-bugs] [Bug 80064][Nor] Changed - Type.GetFields(...) must not return private fields declared in base types

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Nov 28 11:11:02 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lupus at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=80064

--- shadow/80064	2006-11-28 09:41:03.000000000 -0500
+++ shadow/80064.tmp.13845	2006-11-28 11:11:01.000000000 -0500
@@ -153,6 +153,24 @@
 Finalize
 
 
 The mono output must not show any ...privateBase... lines.
 I'll turn the test case into a Nunit test for inclusion into
 corlib/Test/System/TypeTest.cs shortly.
+
+------- Additional Comments From lupus at ximian.com  2006-11-28 11:11 -------
+Thanks. Thinking about it more, we might want more comprehensive test
+cases. For example, what happens if a member is internal and the base
+class is in another assembly? If the call doesn't return private
+members it likely won't return that member as well. I think that the
+best way to go at this point is to write the test case in IL and test
+both with the base class in a separate assembly and in the same
+assembly of the derived type. IL is needed to be able to add fields
+with all the possible visibility values.
+Additionally for properties we could test what happens when the getter
+and setter have different visibility.
+There is also one additional codepath that needs checking: the Get
+methods that take a name.
+Note that nested types should be tested, too and constructors are
+handled in separate reflection calls, so they need adding to the tests
+as well. Sorry that this turned out to be much more work than
+initially thought.


More information about the mono-bugs mailing list