https://bugzilla.novell.com/show_bug.cgi?id=401012
Summary: StructLayout and order of partial class files issue
Product: Mono: Compilers
Version: 1.9.0
Platform: x86
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
Created an attachment (id=222571)
--> (https://bugzilla.novell.com/attachment.cgi?id=222571)
Contains test case and command line for compilation
bug1.cs:
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)]
public partial struct Bug
{
}
---------------------------------------------------------------------
bug2.cs:
public partial struct Bug
{
[System.Runtime.InteropServices.FieldOffset(0)]
public int Integer;
}
---------------------------------------------------------------------
When I compile it like this: gmcs -t:library bug2.cs bug1.cs
I get this error:
bug2.cs(4,14): error CS0636: The FieldOffset attribute can only be placed on
members of types marked with the StructLayout(LayoutKind.Explicit)
but if it's compiled: gmcs -t:library bug1.cs bug2.cs
then compilation is successful.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs