[Mono-bugs] [Bug 431978] New: VBNC9999 error for Property As Dictionary(Of TKey, TValue ).ValueCollection

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 3 10:22:40 EDT 2008


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


           Summary: VBNC9999 error for Property As Dictionary(Of TKey,
                    TValue).ValueCollection
           Product: Mono: Compilers
           Version: unspecified
          Platform: i686
        OS/Version: Linux
            Status: NEW
          Keywords: build
          Severity: Normal
          Priority: P5 - None
         Component: Basic
        AssignedTo: rkvinge at novell.com
        ReportedBy: abatishchev at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User


Hello!
I'm porting a VB.NET project onto Mono and got next error:
Error VBNC99999: Unexpected error: There has been an internal error in the
compiler

Here is code example:
Imports System.Collections.Generic

Public Class Test
  ReadOnly Property Foo1() As Dictionary(Of String, String).ValueCollection
    Get
      Dim dic As Dictionary(Of String, String) = New Dictionary(Of String,
String)
      Return dic.Values
    End Get
  End Property
End Class

This error occurs when a property has a signature of Dictionary(Of TKey,
TValue).ValueCollection or .KeyCollection

If remove - all works fine.

Monodevelop output:
vbnc -out:"/home/godfather/Dev/Test/bin/Debug/Test.dll" -nologo -utf8output
-target:library  "/home/godfather/Dev/Test/Application.vb"
"/home/godfather/Dev/Test/AssemblyInfo.vb"
/home/godfather/Dev/Test/Application.vb (5,60) : Error VBNC99999: Unexpected
error: There has been an internal error in the compiler: Location:
/home/godfather/Dev/Test/Application.vb (5,60)
  at vbnc.tm.AcceptIfNotInternalError (KS Special) [0x00010] in
/home/godfather/Dev/Mono/trunk/mono-basic/vbnc/vbnc/source/Types/TokenManager.vb:279 
  at vbnc.Parser.ParseImplementsClause (vbnc.ParsedObject Parent) [0x0000e] in
/home/godfather/Dev/Mono/trunk/mono-basic/vbnc/vbnc/source/Parser/Parser(Members).vb:516 
  at vbnc.Parser.ParseRegularPropertyMemberDeclaration (vbnc.TypeDeclaration
Parent, vbnc.ParseAttributableInfo Info) [0x0006e] in
/home/godfather/Dev/Mono/trunk/mono-basic/vbnc/vbnc/source/Parser/Parser(Members).vb:109 
  at vbnc.Parser.ParseTypeMembers (vbnc.TypeDeclaration Parent,
vbnc.MemberDeclarations Members) [0x0043d] in
/home/godfather/Dev/Mono/trunk/mono-basic/vbnc/vbnc/source/Parser/Parser.vb:1400 
  at vbnc.Parser.ParseTypeMembers (vbnc.TypeDeclaration Parent) [0x0000c] in
/home/godfather/Dev/Mono/trunk/mono-basic/vbnc/vbnc/source/Parser/Parser.vb:1322 
  at vbnc.Parser.ParseClassDeclaration (vbnc.ParsedObject Parent,
vbnc.Attributes Attributes, System.String Namespace) [0x00147] in
/home/godfather/Dev/Mono/trunk/mono-basic/vbnc/vbnc/source/Parser/Parser(Types).vb:84 
  at vbnc.Parser.ParseTypeDeclaration (vbnc.ParsedObject Parent,
vbnc.Attributes Attributes, System.String Namespace) [0x00010] in
/home/godfather/Dev/Mono/trunk/mono-basic/vbnc/vbnc/source/Parser/Parser.vb:1436 
  at vbnc.Parser.ParseAssemblyMembers (vbnc.AssemblyDeclaration Parent,
System.String RootNamespace, vbnc.MemberDeclarations declarations) [0x001a8] in
/home/godfather/Dev/Mono/trunk/mono-basic/vbnc/vbnc/source/Parser/Parser.vb:1482 
  at vbnc.Parser.ParseAssemblyDeclaration (System.String RootNamespace,
vbnc.AssemblyDeclaration assembly) [0x00092] in
/home/godfather/Dev/Mono/trunk/mono-basic/vbnc/vbnc/source/Parser/Parser.vb:433 
  at vbnc.Parser.Parse (System.String RootNamespace, vbnc.AssemblyDeclaration
assembly) [0x00002] in
/home/godfather/Dev/Mono/trunk/mono-basic/vbnc/vbnc/source/Parser/Parser.vb:58 
  at vbnc.Compiler.Compile_Parse () [0x0006d] in
/home/godfather/Dev/Mono/trunk/mono-basic/vbnc/vbnc/source/General/Compiler.vb:363

I'm using Debian(lenny), kernel 2.6.26-1, Gnome 2.22.3 and vbnc from svn/trunk.
vbnc from branches/mono-1-9 and branches/mono-2-0 has the same error I guess.

By the way, if use a Function instead of Property next error occurs:  Error
VBNC30205: Expected end of statement
I mean code like this:
Function Foo2 As Dictionary(Of String, String).ValueCollection
  Dim dic As Dictionary(Of String, String) = New Dictionary(Of String, String)
  Return dic.Values
End Function


-- 
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