http://bugzilla.novell.com/show_bug.cgi?id=524498


           Summary: .cctor throws and calls to static methods succeed
    Classification: Mono
           Product: Mono: Runtime
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


tar -xzf the attached test case,
then 'cd cctor && make'
then 'mono cctor.exe'

The static constructor throws because of a MethodAccessException or similar,
but if the exception is caught, further calls to other methods of the class
succeed.

Output from mono:
Exception: Method `Testing.OtherDll:get_String ()' is inaccessible from method
`Testing.OtherClass:.cctor ()'


Output from MS:
C:\tests>cctor
Exception: The type initializer for 'Testing.OtherClass' threw an exception.

Unhandled Exception: System.TypeInitializationException: The type initializer
fo
r 'Testing.OtherClass' threw an exception. ---> System.MethodAccessException:
Te
sting.OtherDll.get_String()
   at Testing.OtherClass..cctor()
   --- End of inner exception stack trace ---
   at Testing.OtherClass.get_SomeOther()
   at Testing.Test.Main()

-- 
Configure bugmail: http://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

Reply via email to