https://bugzilla.novell.com/show_bug.cgi?id=633671
https://bugzilla.novell.com/show_bug.cgi?id=633671#c0 Summary: ReflectedType and DeclaringType on MemberInfo returns incorrect information Classification: Mono Product: Mono: Runtime Version: 2.6.x Platform: i686 OS/Version: Ubuntu Status: NEW Severity: Normal Priority: P5 - None Component: misc AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100812 Ubuntu/10.10 (maverick) Firefox/3.6.8 I have a test framework that makes heavy use of reflection to allow building of automated test data. I have found the attached code that seems to have somewhat inconsistent behaviour running under Mono 2.6.7 on Ubuntu 10.10 alpha. The attached code produces the following output on my machine: Child1 MonoReflectionTest.ClassWithNullableDateTime MonoReflectionTest.InheritsFromClassWithNullableDateTime Child1 MonoReflectionTest.InheritsFromClassWithNullableDateTime MonoReflectionTest.InheritsFromClassWithNullableDateTime The key problem with this is that the second access to the MemberInfo's DeclaringType and ReflectedType actually changes the DeclaringType's result from MonoReflectionTest.ClassWithNullableDateTime (correct) to MonoReflectionTest.InheritsFromClassWithNullableDateTime (reflected, not declaring typed) The attached demonstration program should contain a 100% reproducible test case, that functions without mishap on MS's .Net 3.5. Reproducible: Always Steps to Reproduce: <Attached script can be built as a standalone exe and the output results observed> Expected Results: I would expected ReflectedType and DeclaringType to be consistent between calls and not change. In the case of the attached program, I would specifically expect the program output to reflect: Child1 MonoReflectionTest.ClassWithNullableDateTime MonoReflectionTest.InheritsFromClassWithNullableDateTime Child1 MonoReflectionTest.ClassWithNullableDateTime MonoReflectionTest.InheritsFromClassWithNullableDateTime -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
