2007-03-13 Jonathan Chambers <joncham@gmail.com>
[mono.git] / mcs / tests / test-567.cs
1 // Test for bug 63841 -- GetElementType() returns underlying enum type
2 // instead of null
3
4 using System;
5
6 class Test
7 {
8         static void Main ()
9         {
10                 Type a = typeof (A).GetElementType ();
11                 if (a != null)
12                         Console.WriteLine ("ERROR a != null");
13
14                 Type b = typeof (B).GetElementType ();
15                 if (b != null)
16                         Console.WriteLine ("ERROR b != null");
17
18                 Type c = typeof (C).GetElementType ();
19                 if (c != null)
20                         Console.WriteLine ("ERROR c != null");
21         }
22
23         enum A { }
24         enum B : byte { }
25         enum C : byte { X, Y, Z }
26 }