[Mono-dev] [mono-vb] vb.net compiler error

Alexander Concha xknown at gmail.com
Thu Jan 12 22:00:48 EST 2006


Try to compile this:

[code]

Imports System

Public Class Foo
        Public Shared Sub Main()
                Dummy(Console.WriteLine()) ' Error
        End Sub
        Public Shared Sub Dummy(ByVal x as String)
        End Sub
End Class

[/code]

Actual Results:

[alex at localhost tests]$ mbas bar.vb
MonoBASIC Compiler  1.1.11.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
--------
THIS IS AN ALPHA SOFTWARE.
--------
Compilation succeeded
[alex at localhost tests]$ mono bar.exe

** ERROR **: Invalid IL code at IL0005 in Foo:Main (): IL_0005: box
0x01000003


aborting...
Abortado


Expected Results:

It should not compile, since WriteLine method _returns void_

Regards
--
Alexander Concha Abarca
alex[@]buayacorp.com
Cusco - Perú
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060112/d2674dbb/attachment.html 


More information about the Mono-devel-list mailing list