fjgandrade / sharpkit

Automatically exported from code.google.com/p/sharpkit
0 stars 0 forks source link

Cannot cast integers to enums #371

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This code:

    public static class Test
    {
        public enum EnTest { En1 }

        public static void RunTest()
        {
            int i = 0;
            EnTest e = (EnTest)i;
        }
    }

will crash in SharpKit.

Original issue reported on code.google.com by polofili...@gmail.com on 25 Sep 2014 at 9:18

GoogleCodeExporter commented 9 years ago
I cannot reproduce this issue. Please add an complete example project as zip 
file. And the error stack trace.

Original comment by sebastia...@gmail.com on 8 Oct 2014 at 10:52

GoogleCodeExporter commented 9 years ago
Attaching the test project. If the test succeeds, the browser will show a 
"success" message box. If the test fails, the browser will show the exception.

I don't have a stack trace.

Original comment by polofili...@gmail.com on 8 Oct 2014 at 1:01

Attachments:

GoogleCodeExporter commented 9 years ago
You wrote "It will crash in SharpKit". So i thought it's a compiler crash.

I fixed this issue now.

Original comment by sebastia...@gmail.com on 13 Oct 2014 at 2:49