[Mono-list] mint bug: doesn't recognize enum as value type.

Adam Treat manyoso@yahoo.com
Mon, 25 Feb 2002 21:07:59 -0800


With the Microsoft runtime the following code prints:

0
b

But with mint I get an error:

(process:2182): ** ERROR **: file object.c: line 318 (mono_value_box): 
assertion failed: (class->valuetype)
aborting...
Trace/breakpoint trap

Cheers,

Adam

=======================================================

//
// Tests mint and enums.
//

using System;

public enum foo:int {
	a = 0,
	b = 1
}

public class Blah {

	static void Main() {
		Console.WriteLine((int)foo.a + "This works.");
		Console.WriteLine(foo.b + "This doesn't work.");
	}
}