[Mono-bugs] [Bug 524498] New: .cctor throws and calls to static	methods succeed
    bugzilla_noreply at novell.com 
    bugzilla_noreply at novell.com
       
    Thu Jul 23 02:17:21 EDT 2009
    
    
  
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: mono-bugs at lists.ximian.com
        ReportedBy: gonzalo at novell.com
         QAContact: mono-bugs at lists.ximian.com
          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.
    
    
More information about the mono-bugs
mailing list