{"action":"created","issue":{"url":"https://api.github.com/repos/sq/JSIL/issues/922","labels_url":"https://api.github.com/repos/sq/JSIL/issues/922/labels{/name}","comments_url":"https://api.github.com/repos/sq/JSIL/issues/922/comments","events_url":"https://api.github.com/repos/sq/JSIL/issues/922/events","html_url":"https://github.com/sq/JSIL/issues/922","id":120323864,"number":922,"title":"Switch statement broken in Roslyn","user":{"login":"mdaveynis","id":16145224,"avatar_url":"https://avatars.githubusercontent.com/u/16145224?v=3","gravatar_id":"","url":"https://api.github.com/users/mdaveynis","html_url":"https://github.com/mdaveynis","followers_url":"https://api.github.com/users/mdaveynis/followers","following_url":"https://api.github.com/users/mdaveynis/following{/other_user}","gists_url":"https://api.github.com/users/mdaveynis/gists{/gist_id}","starred_url":"https://api.github.com/users/mdaveynis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdaveynis/subscriptions","organizations_url":"https://api.github.com/users/mdaveynis/orgs","repos_url":"https://api.github.com/users/mdaveynis/repos","events_url":"https://api.github.com/users/mdaveynis/events{/privacy}","received_events_url":"https://api.github.com/users/mdaveynis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sq/JSIL/labels/Bug","name":"Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-04T03:21:54Z","updated_at":"2015-12-04T09:08:39Z","closed_at":null,"body":"Following test-case fails only if using Roslyn (it works on a smaller amount of case statements, i.e. if case \"G\" is removed):\r\n\r\n```\r\n//@useroslyn\r\n\r\nusing System;\r\n\r\npublic static class Program {\r\n\r\n    public static void Main (string[] args)\r\n    {\r\n        var a = GetValue();\r\n        switch (a)\r\n        {\r\n            case \"A\":\r\n                Console.Write(\"A\");\r\n                break;\r\n\r\n            case \"B\":\r\n                Console.Write(\"B\");\r\n                break;\r\n            case \"C\":\r\n                Console.Write(\"C\");\r\n                break;\r\n            case \"D\":\r\n                Console.Write(\"D\");\r\n                break;\r\n\r\n            case \"E\":\r\n                Console.Write(\"E\");\r\n                break;\r\n\r\n            case \"F\":\r\n                Console.Write(\"F\");\r\n                break;\r\n\r\n           case \"G\":\r\n                Console.Write(\"G\");\r\n                break;\r\n        }\r\n    }\r\n\r\n    private static string GetValue()\r\n    {\r\n        return \"C\";\r\n    }\r\n}\r\n```\r\nTranslation result:\r\n\r\n```\r\n  function Program_GetValue () {\r\n    return \"C\";\r\n  }; \r\n\r\n  function Program_Main (args) {\r\n    var a = $thisType.GetValue();\r\n    var num = (JSIL.IgnoredMember(\"ComputeStringHash(s)\", a).LValue >>> 0);\r\n    if (num <= 3255563174) {\r\n      if (num !== 3222007936) {\r\n        if (num !== 3238785555) {\r\n          if (num !== 3255563174) {\r\n            return;\r\n          }\r\n          if (!(a == \"G\")) {\r\n            return;\r\n          }\r\n          $T03().Write(\"G\");\r\n          return;\r\n        } else {\r\n          if (!(a == \"D\")) {\r\n            return;\r\n          }\r\n          $T03().Write(\"D\");\r\n          return;\r\n        }\r\n      } else {\r\n        if (!(a == \"E\")) {\r\n          return;\r\n        }\r\n        $T03().Write(\"E\");\r\n        return;\r\n      }\r\n    } else if (num <= 3289118412) {\r\n      if (num !== 3272340793) {\r\n        if (num !== 3289118412) {\r\n          return;\r\n        }\r\n        if (!(a == \"A\")) {\r\n          return;\r\n        }\r\n        $T03().Write(\"A\");\r\n        return;\r\n      } else {\r\n        if (!(a == \"F\")) {\r\n          return;\r\n        }\r\n        $T03().Write(\"F\");\r\n        return;\r\n      }\r\n    } else if (num !== 3322673650) {\r\n      if (num !== 3339451269) {\r\n        return;\r\n      }\r\n      if (!(a == \"B\")) {\r\n        return;\r\n      }\r\n      $T03().Write(\"B\");\r\n      return;\r\n    } else {\r\n      if (!(a == \"C\")) {\r\n        return;\r\n      }\r\n      $T03().Write(\"C\");\r\n      return;\r\n    }\r\n  }; \r\n```"},"comment":{"url":"https://api.github.com/repos/sq/JSIL/issues/comments/161914442","html_url":"https://github.com/sq/JSIL/issues/922#issuecomment-161914442","issue_url":"https://api.github.com/repos/sq/JSIL/issues/922","id":161914442,"user":{"login":"iskiselev","id":5084964,"avatar_url":"https://avatars.githubusercontent.com/u/5084964?v=3","gravatar_id":"","url":"https://api.github.com/users/iskiselev","html_url":"https://github.com/iskiselev","followers_url":"https://api.github.com/users/iskiselev/followers","following_url":"https://api.github.com/users/iskiselev/following{/other_user}","gists_url":"https://api.github.com/users/iskiselev/gists{/gist_id}","starred_url":"https://api.github.com/users/iskiselev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iskiselev/subscriptions","organizations_url":"https://api.github.com/users/iskiselev/orgs","repos_url":"https://api.github.com/users/iskiselev/repos","events_url":"https://api.github.com/users/iskiselev/events{/privacy}","received_events_url":"https://api.github.com/users/iskiselev/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T09:08:39Z","updated_at":"2015-12-04T09:08:39Z","body":"I suppose there is some filters to strip such classes. Previously it was  used only for array initillization.\r\nAt the same time it may be problem introduced by ILSpy- I was unable to find this class in ILSpy, it is visible only with ILDasm."}}