[Mono-bugs] [Bug 354369] New: Handlng an event which isn't defined crashes vbnc

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jan 17 02:54:32 EST 2008


           Summary: Handlng an event which isn't defined crashes vbnc
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: ASSIGNED
          Severity: Normal
          Priority: P5 - None
         Component: Basic
        AssignedTo: rkvinge at novell.com
        ReportedBy: rkvinge at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Imports System.Windows.Forms

Public Class Form1
'       Inherits Form

        public shared sub Main 
                dim f as new Form1
        end sub

    Private collection As New Collection
    Friend Structure thing
        Dim num As Int32     'Room ID number
        Dim Name As String  'The name of the room - E.G. "L9" Is one of my
computing classrooms
    End Structure

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
        Dim thing As thing

        thing.num = 1
        thing.Name = "one"


        thing.num = 2
        thing.Name = "two"


        thing.num = 1
        thing.Name = "three"


        Dim index As Integer = 2
        Dim num As Integer = 1
        MsgBox("starting test")
        If collection(index).num = num Then 'if id passed equals id in database
            MsgBox("Not tada")
        End If
    End Sub
End Class

rolf at linux:~/test> vbnc vb.vb -target:winexe
Visual Basic.Net Compiler version
Copyright (C) 2004-2007 Rolf Bjarne Kvinge. All rights reserved.

/home/rolf/test/vb.vb (8,5) : Error VBNC30456: 'Show' is not a member of
/home/rolf/test/vb.vb (18,102) : Error VBNC99999: Must handle an event:
/home/rolf/test/vb.vb (18,102)
Error : VBNC99999: Unexpected error: Cannot cast from source type to
destination type.
  at vbnc.AddOrRemoveHandlerStatement.Init (vbnc.Expression Event,
vbnc.MethodDeclaration EventHandler, Boolean IsAddHandler, vbnc.Expression
InstanceExpression) [0x00010] in
  at vbnc.EventMemberSpecifier.ResolveCode (vbnc.ResolveInfo Info) [0x000eb] in
  at vbnc.Helper.ResolveCodeCollection (IEnumerable Collection,
vbnc.ResolveInfo Info) [0x00044] in
  at vbnc.BaseList`1[vbnc.EventMemberSpecifier].ResolveCode (vbnc.ResolveInfo )
[0x00000] in /mono/head/mono-basic/vbnc/vbnc/source/Members/BaseList~1.vb:31
  at vbnc.HandlesClause.ResolveCode (vbnc.ResolveInfo Info) [0x00000] in
  at vbnc.HandlesOrImplements.ResolveCode (vbnc.ResolveInfo Info) [0x00000] in
  at vbnc.SubDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00013] in
  at vbnc.Helper.ResolveCodeCollection (IEnumerable Collection,
vbnc.ResolveInfo Info) [0x00044] in
  at vbnc.BaseObjects`1[vbnc.IMember].ResolveCode (vbnc.ResolveInfo ) [0x00000]
in /mono/head/mono-basic/vbnc/vbnc/source/General/BaseObjects`1.vb:65
  at vbnc.TypeDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x0001c] in
  at vbnc.ClassDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00002] in
  at vbnc.AssemblyDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x0002a] in
  at vbnc.Compiler.Compile_Resolve () [0x001a9] in
  at vbnc.Compiler.Compile () [0x0028a] in
Compilation took 00:00:01.9044290

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