http://bugzilla.novell.com/show_bug.cgi?id=591272
http://bugzilla.novell.com/show_bug.cgi?id=591272#c0 Summary: VBNC99997 - Compilation error when performing ToString() on element of a multidimensional array of Integers Classification: Mono Product: Mono: Compilers Version: 2.4.x Platform: 32bit OS/Version: Ubuntu Status: NEW Severity: Major Priority: P5 - None Component: Basic AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8 This simple peace of code causes VB compiler error: ======== BAD CODE - BEGIN ======== Imports System Imports System.Collections Module Module1 Sub Main(ByVal args As String()) Dim matrice As Integer(,) = New Integer(2, 2) {} matrice(0, 0) = 1 Dim str As String = matrice(0, 0).ToString() 'Bad line! Console.WriteLine(str) End Sub End Module ======== BAD CODE - END ======== The problem is "matrice(0, 0).ToString()". When I use some temporal variable to get an element from array, then compiler works fine. For example: ======== CHANGED CODE WHICH WORKS PROPERLY - BEGIN ======== Imports System Imports System.Collections Module Module1 Sub Main(ByVal args As String()) Dim matrice As Integer(,) = New Integer(2, 2) {} matrice(0, 0) = 1 'Dim str As String = matrice(0, 0).ToString() 'old line Dim tmp As Integer = matrice(0, 0) 'new line #1 Dim str As String = tmp.ToString() 'new line #2 Console.WriteLine(str) End Sub End Module ======== CHANGED CODE WHICH WORKS PROPERLY ======== Reproducible: Always Steps to Reproduce: 1. Save BAD CODE to a file, for example source.vb 2. vbnc source.vb Actual Results: The compiler outputs: Visual Basic.Net Compiler version 0.0.0.5914 (Mono 2.4.2 - r) Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved. /home/wiele/tmp/<MyGenerator> (1,1) : Error VBNC99997: You've encountered something in the compiler which is not implemented. Please file a bug (see instructions here: http://mono-project.com/Bugs) There were 1 errors and 0 warnings. Compilation took 00:00:01.1494360 Expected Results: Compiler should successfully compile the program. Executed program should write "1" to stdout. I've tried to compile the code on Ubuntu, Debian and Gentoo - the results were the same under every OS. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
