[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


https://bugzilla.novell.com/show_bug.cgi?id=354369


           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
                f.Show
        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"

        collection.Add(thing)


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

        collection.Add(thing)


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

        collection.Add(thing)


        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("tada")
        Else
            MsgBox("Not tada")
        End If
    End Sub
End Class


rolf at linux:~/test> vbnc vb.vb -target:winexe
Visual Basic.Net Compiler version 0.0.0.5852
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
'Form1'.
/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
/mono/head/mono-basic/vbnc/vbnc/source/Statements/AddOrRemoveHandlerStatement.vb:57
  at vbnc.EventMemberSpecifier.ResolveCode (vbnc.ResolveInfo Info) [0x000eb] in
/mono/head/mono-basic/vbnc/vbnc/source/Members/EventMemberSpecifier.vb:89
  at vbnc.Helper.ResolveCodeCollection (IEnumerable Collection,
vbnc.ResolveInfo Info) [0x00044] in
/mono/head/mono-basic/vbnc/vbnc/source/General/Helper.vb:2338
  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
/mono/head/mono-basic/vbnc/vbnc/source/Members/HandlesClause.vb:45
  at vbnc.HandlesOrImplements.ResolveCode (vbnc.ResolveInfo Info) [0x00000] in
/mono/head/mono-basic/vbnc/vbnc/source/Members/HandlesOrImplements.vb:90
  at vbnc.SubDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00013] in
/mono/head/mono-basic/vbnc/vbnc/source/Members/SubDeclaration.vb:120
  at vbnc.Helper.ResolveCodeCollection (IEnumerable Collection,
vbnc.ResolveInfo Info) [0x00044] in
/mono/head/mono-basic/vbnc/vbnc/source/General/Helper.vb:2338
  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
/mono/head/mono-basic/vbnc/vbnc/source/TypeDeclarations/TypeDeclaration.vb:487
  at vbnc.ClassDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00002] in
/mono/head/mono-basic/vbnc/vbnc/source/TypeDeclarations/ClassDeclaration.vb:125
  at vbnc.AssemblyDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x0002a] in
/mono/head/mono-basic/vbnc/vbnc/source/TypeDeclarations/AssemblyDeclaration.vb:209
  at vbnc.Compiler.Compile_Resolve () [0x001a9] in
/mono/head/mono-basic/vbnc/vbnc/source/General/Compiler.vb:424
  at vbnc.Compiler.Compile () [0x0028a] in
/mono/head/mono-basic/vbnc/vbnc/source/General/Compiler.vb:557
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