2 // This test exhibits an old bug where we did not
3 // go into the underlying type for an enumeration, and
4 // hence implicit and explicit casts were not working when
5 // they were going from a type to an enum
17 static bool ShortCasting ()
22 i = (short) a; //<- crash
23 a = (N1.A)i;//<- used to fail, can't convert
30 static bool IntCasting ()
35 i = (int) a;//<- works fine
36 a = (N1.A)i;//<- used to fail, can't convert