{"action":"closed","issue":{"url":"https://api.github.com/repos/emicklei/proto/issues/49","repository_url":"https://api.github.com/repos/emicklei/proto","labels_url":"https://api.github.com/repos/emicklei/proto/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/emicklei/proto/issues/49/comments","events_url":"https://api.github.com/repos/emicklei/proto/issues/49/events","html_url":"https://github.com/emicklei/proto/issues/49","id":285696501,"number":49,"title":"Non-primitive field option followed by any option cannot be parsed","user":{"login":"peter-edge","id":4228796,"avatar_url":"https://avatars1.githubusercontent.com/u/4228796?v=4","gravatar_id":"","url":"https://api.github.com/users/peter-edge","html_url":"https://github.com/peter-edge","followers_url":"https://api.github.com/users/peter-edge/followers","following_url":"https://api.github.com/users/peter-edge/following{/other_user}","gists_url":"https://api.github.com/users/peter-edge/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-edge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-edge/subscriptions","organizations_url":"https://api.github.com/users/peter-edge/orgs","repos_url":"https://api.github.com/users/peter-edge/repos","events_url":"https://api.github.com/users/peter-edge/events{/privacy}","received_events_url":"https://api.github.com/users/peter-edge/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-01-03T14:06:29Z","updated_at":"2018-02-27T19:40:04Z","closed_at":"2018-02-27T19:40:04Z","author_association":"CONTRIBUTOR","body":"```go\r\nfunc TestFieldCustomOptions(t *testing.T) {\r\n\tproto := `foo.bar lots = 1 [foo={hello:1}, bar=2];`\r\n\tp := newParserOn(proto)\r\n\tf := newNormalField()\r\n\terr := f.parse(p)\r\n\tif err != nil {\r\n\t\tt.Fatal(err)\r\n\t}\r\n\tif got, want := f.Type, \"foo.bar\"; got != want {\r\n\t\tt.Errorf(\"got [%v] want [%v]\", got, want)\r\n\t}\r\n\tif got, want := f.Name, \"lots\"; got != want {\r\n\t\tt.Errorf(\"got [%v] want [%v]\", got, want)\r\n\t}\r\n\tif got, want := len(f.Options), 2; got != want {\r\n\t\tt.Fatalf(\"got [%v] want [%v]\", got, want)\r\n\t}\r\n\tif got, want := f.Options[0].Name, \"foo\"; got != want {\r\n\t\tt.Errorf(\"got [%v] want [%v]\", got, want)\r\n\t}\r\n\tif got, want := f.Options[1].Name, \"bar\"; got != want {\r\n\t\tt.Errorf(\"got [%v] want [%v]\", got, want)\r\n\t}\r\n\tif got, want := f.Options[1].Constant.Source, \"2\"; got != want {\r\n\t\tt.Errorf(\"got [%v] want [%v]\", got, want)\r\n\t}\r\n}\r\n```\r\n\r\nThis returns:\r\n\r\n```\r\n<input>:1:37: found \"=\" but expected [option aggregate key colon :]\r\n```\r\n\r\nThis fails if `bar` is a non-primitive as well. If `foo` is a primitive and `bar` is a non-primitive, this passes."}}
{"actor":{"display_login":"peter-edge"}}