[Mono-bugs] [Bug 462515] New: calling private method from subclass leads to compiler crash

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Dec 25 10:33:17 EST 2008


           Summary: calling private method from subclass leads to compiler
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: vargaz at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

using System;

public class Foo
        void Bar () {

public class Baz : Foo
        public static void Main (String[] args) {
                Bar ();

To reproduce:

gmcs bug.cs
bug.cs(5,14): warning CS0169: The private method `Foo.Bar()' is never used

Unhandled Exception: Mono.CSharp.InternalErrorException: bug.cs(9,14): Baz --->
System.InvalidOperationException: Method 'Baz.Main' does not have a method
  at System.Reflection.Emit.MethodBuilder.fixup () [0x00000]
  at System.Reflection.Emit.TypeBuilder.CreateType () [0x00000]
  at Mono.CSharp.TypeContainer.CloseType () [0x00000]
  --- End of inner exception stack trace ---
  at Mono.CSharp.TypeContainer.CloseType () [0x00000]
  at Mono.CSharp.RootContext.CloseTypes () [0x00000]
  at Mono.CSharp.Driver.Compile () [0x00000]
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]

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.

More information about the mono-bugs mailing list