{"action":"closed","issue":{"url":"https://api.github.com/repos/google/flatbuffers/issues/252","labels_url":"https://api.github.com/repos/google/flatbuffers/issues/252/labels{/name}","comments_url":"https://api.github.com/repos/google/flatbuffers/issues/252/comments","events_url":"https://api.github.com/repos/google/flatbuffers/issues/252/events","html_url":"https://github.com/google/flatbuffers/issues/252","id":100344393,"number":252,"title":"C# code for simple table containing enum field with non-zero default does not compile","user":{"login":"mormegil-cz","id":432985,"avatar_url":"https://avatars.githubusercontent.com/u/432985?v=3","gravatar_id":"","url":"https://api.github.com/users/mormegil-cz","html_url":"https://github.com/mormegil-cz","followers_url":"https://api.github.com/users/mormegil-cz/followers","following_url":"https://api.github.com/users/mormegil-cz/following{/other_user}","gists_url":"https://api.github.com/users/mormegil-cz/gists{/gist_id}","starred_url":"https://api.github.com/users/mormegil-cz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mormegil-cz/subscriptions","organizations_url":"https://api.github.com/users/mormegil-cz/orgs","repos_url":"https://api.github.com/users/mormegil-cz/repos","events_url":"https://api.github.com/users/mormegil-cz/events{/privacy}","received_events_url":"https://api.github.com/users/mormegil-cz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-11T15:51:58Z","updated_at":"2015-08-12T16:22:14Z","closed_at":"2015-08-12T16:22:14Z","body":"As reported at [the flatbuffers Google Group](https://groups.google.com/forum/#!topic/flatbuffers/Ftj03LKZD4I) (and pointed out at [PR 172](https://github.com/google/flatbuffers/pull/172#issuecomment-129525876)), the following schema:\r\n```\r\nnamespace FLBSchemas;\r\nenum EColor : int {  Red = 1, Green, Blue }\r\ntable Generic {\r\n\tid:string (key);\r\n\ttestColor:EColor = Red;\r\n}\r\nroot_type Generic;\r\n```\r\ngenerates the following uncompilable C# code:\r\n```\r\n  public static int CreateGeneric(FlatBufferBuilder builder,\r\n      int id = 0,\r\n      EColor testColor = 1) {  //<-- error here\r\n```"}}