[Mono-bugs] [Bug 320964] Internal error when member hides inherited member

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Sep 18 11:20:05 EDT 2007


Gert Driesen <gert.driesen at pandora.be> changed:

           What    |Removed                                         |Added
                 CC|                                                |gert.driesen at pandora.be
            Summary|Web Forms running on Windows don't run on Linux |Internal error when member hides inherited
                   |                                                |member

--- Comment #1 from Gert Driesen <gert.driesen at pandora.be>  2007-09-18 09:20:05 MST ---
I've managed to locate the cause of this bug.

VBNC reports an internal error when a member hides a member of a base class:

To reproduce, compile the following code snippet:

Public Class A
    Public ReadOnly Property Header As String
            Return "OK"
        End Get
    End Property
End Class

Public Class B
    Inherits A
    Protected header As String

    Public Shared Sub Main
        Dim b as B = new B ()
        System.Console.WriteLine (b.header)
    End Sub
End Class

Expected result:

test.vb(11) : warning BC40004: variable 'header' conflicts with property
'header' in the base class 'A' and should be declared 'Shadows'.

Actual result:

Unexpected error: There has been an internal error in the compiler caused by
 line: (15,37)
  at vbnc.MemberAccessExpression.ResolveExpressionInternal (vbnc.ResolveInfo
o) [0x00000]
  at vbnc.Expression.ResolveExpression (vbnc.ResolveInfo ResolveInfo) [0x00000]
  at vbnc.Argument.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
  at vbnc.Helper.ResolveCodeCollection (IEnumerable Collection,
 Info) [0x00000]
  at vbnc.ArgumentList.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
  at vbnc.InvocationOrIndexExpression.ResolveExpressionInternal
o Info) [0x00000]
  at vbnc.Expression.ResolveExpression (vbnc.ResolveInfo ResolveInfo) [0x00000]
  at vbnc.CallStatement.ResolveStatement (vbnc.ResolveInfo Info) [0x00000]
  at vbnc.CodeBlock.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
  at vbnc.MethodBaseDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
  at vbnc.MethodDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
  at vbnc.SubDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
  at vbnc.Helper.ResolveCodeCollection (IEnumerable Collection,
 Info) [0x00000]
  at vbnc.BaseObjects`1[vbnc.IMember].ResolveCode (vbnc.ResolveInfo ) [0x00000]
  at vbnc.TypeDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
  at vbnc.ClassDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
  at vbnc.AssemblyDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000]
  at vbnc.Compiler.Compile_Resolve () [0x00000]
  at vbnc.Compiler.Compile () [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.

More information about the mono-bugs mailing list