[Mono-bugs] [Bug 75082][Wis] New - Compilation breaks down in line
with FieldOffset
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat May 28 12:22:58 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by jwezel at compumaster.de.
http://bugzilla.ximian.com/show_bug.cgi?id=75082
--- shadow/75082 2005-05-28 12:22:58.000000000 -0400
+++ shadow/75082.tmp.5851 2005-05-28 12:22:58.000000000 -0400
@@ -0,0 +1,88 @@
+Bug#: 75082
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Basic
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: jwezel at compumaster.de
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Compilation breaks down in line with FieldOffset
+
+Description of Problem:
+[root at lwezel tmp]# mbas test.vb
+MonoBASIC Compiler 0.96.1.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
+--------
+THIS IS AN ALPHA SOFTWARE.
+--------
+syntax error, got token `OP_LT'
+test.vb(8,8) error BC29999: Parsing error
+Compilation failed: 1 Error(s), 0 warnings
+[root at lwezel tmp]#
+
+
+Steps to reproduce the problem:
+1. Compile this source code which compiles and runs fine under MS.NET:
+[root at lwezel tmp]# cat test.vb
+Imports System
+Imports System.Runtime.InteropServices
+
+Module Module1
+
+ <StructLayout(LayoutKind.Explicit)> _
+ Structure test
+ <FieldOffset(0)> Dim a As Byte
+ <FieldOffset(1)> Dim b As Byte
+ <FieldOffset(2)> Dim c As Byte
+ <FieldOffset(3)> Dim d As Byte
+ <FieldOffset(4)> Dim e As Byte
+ <FieldOffset(5)> Dim f As Byte
+ <FieldOffset(6)> Dim g As Byte
+ <FieldOffset(7)> Dim h As Byte
+ <FieldOffset(0)> Dim aa As Long
+ End Structure
+
+ Sub Main()
+ Dim Mytest As test
+ Console.WriteLine(Mytest.aa.ToString)
+ Mytest.a = 255
+ Console.WriteLine(Mytest.aa.ToString)
+ Mytest.b = 255
+ Console.WriteLine(Mytest.aa.ToString)
+ Mytest.c = 255
+ Console.WriteLine(Mytest.aa.ToString)
+ Mytest.d = 255
+ Console.WriteLine(Mytest.aa.ToString)
+ Mytest.e = 255
+ Console.WriteLine(Mytest.aa.ToString)
+ Mytest.f = 255
+ Console.WriteLine(Mytest.aa.ToString)
+ Mytest.g = 255
+ Console.WriteLine(Mytest.aa.ToString)
+ Mytest.h = 127
+ Console.WriteLine(Mytest.aa.ToString)
+ Console.WriteLine(Mytest.aa.MaxValue.ToString)
+ End
+ End Sub
+End Module
+
+[root at lwezel tmp]#
+
+
+Actual Results:
+compiler errors
+
+Expected Results:
+should compile and execute
+
+How often does this happen?
+always
+
+Additional Information:
More information about the mono-bugs
mailing list