[Mono-dev] Strange enum issue

Neale Ferguson neale at sinenomine.net
Tue Mar 10 17:41:54 UTC 2015


I really need some advice or direction on this…

If I make the following change to external/ikvm/reflect/Projection.cs:

--- a/reflect/Projection.cs
+++ b/reflect/Projection.cs
@@ -71,11 +71,17 @@ namespace IKVM.Reflection
 
                static WindowsRuntimeProjection()
                {
+Console.Error.WriteLine("WindowsRuntimeProjection - {0} {1} {2}",
+ProjectionAssembly.System_Runtime,
+ProjectionAssembly.System_Runtime_InteropServices_WindowsRuntime,
+ProjectionAssembly.Count);

and build and use it on x86_64 it will output:

WindowsRuntimeProjection - System_Runtime
System_Runtime_InteropServices_WindowsRuntime Count

However, on s390x it outputs:

WindowsRuntimeProjection - System_Runtime 1 5

I'm trying to work out why there is this difference and whether it is
responsible for a crash later during the build process.

The enum looks like:

                enum ProjectionAssembly
                {
                        System_Runtime,
                        System_Runtime_InteropServices_WindowsRuntime,
                        System_ObjectModel,
                        System_Runtime_WindowsRuntime,
                        System_Runtime_WindowsRuntime_UI_Xaml,

                        Count
                }

If I play around with the order of entries, only the one listed first gets
printed as the enum name and the others get the integer value.


Neale




More information about the Mono-devel-list mailing list