{"action":"created","issue":{"url":"https://api.github.com/repos/wstrange/asn1lib/issues/8","labels_url":"https://api.github.com/repos/wstrange/asn1lib/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/wstrange/asn1lib/issues/8/comments","events_url":"https://api.github.com/repos/wstrange/asn1lib/issues/8/events","html_url":"https://github.com/wstrange/asn1lib/issues/8","id":59395266,"number":8,"title":"Boolean encodes too early, can't override tag","user":{"login":"chrisridd","id":237257,"avatar_url":"https://avatars.githubusercontent.com/u/237257?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisridd","html_url":"https://github.com/chrisridd","followers_url":"https://api.github.com/users/chrisridd/followers","following_url":"https://api.github.com/users/chrisridd/following{/other_user}","gists_url":"https://api.github.com/users/chrisridd/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisridd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisridd/subscriptions","organizations_url":"https://api.github.com/users/chrisridd/orgs","repos_url":"https://api.github.com/users/chrisridd/repos","events_url":"https://api.github.com/users/chrisridd/events{/privacy}","received_events_url":"https://api.github.com/users/chrisridd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-01T13:06:35Z","updated_at":"2015-03-03T20:54:34Z","closed_at":null,"body":"This causes code like this (from the sorting control) to encode using the default tag, not the overridden one.\r\n\r\n```\r\n        var b = new ASN1Boolean(true); //todo: we should support tag override for asn1 bool\r\n        b.tag = TYPE_REVERSE_ORDER; // override tag for CHOICE type\r\n```\r\n\r\nTaking out the _encode() from the constructor to align it with the other ASN1Objects will probably help."},"comment":{"url":"https://api.github.com/repos/wstrange/asn1lib/issues/comments/77032365","html_url":"https://github.com/wstrange/asn1lib/issues/8#issuecomment-77032365","issue_url":"https://api.github.com/repos/wstrange/asn1lib/issues/8","id":77032365,"user":{"login":"wstrange","id":447076,"avatar_url":"https://avatars.githubusercontent.com/u/447076?v=3","gravatar_id":"","url":"https://api.github.com/users/wstrange","html_url":"https://github.com/wstrange","followers_url":"https://api.github.com/users/wstrange/followers","following_url":"https://api.github.com/users/wstrange/following{/other_user}","gists_url":"https://api.github.com/users/wstrange/gists{/gist_id}","starred_url":"https://api.github.com/users/wstrange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wstrange/subscriptions","organizations_url":"https://api.github.com/users/wstrange/orgs","repos_url":"https://api.github.com/users/wstrange/repos","events_url":"https://api.github.com/users/wstrange/events{/privacy}","received_events_url":"https://api.github.com/users/wstrange/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T20:54:34Z","updated_at":"2015-03-03T20:54:34Z","body":"Do we even need a setter for tag?\n\nIf we use the solution of passing the tag as a named param all the way up\nto ASN1Object, this should suffice?\n\n\n\nOn Tue, Mar 3, 2015 at 12:31 PM Steven Roose <notifications@github.com>\nwrote:\n\n> Consider this solution:\n>\n> int _tag;int get tag => _tag;set tag(int tag) {\n>   _encodedBytes = null;\n>   return _tag = tag;\n> }\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/wstrange/asn1lib/issues/8#issuecomment-77016641>.\n>\n"}}