{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/16369","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/16369/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/16369/comments","events_url":"https://api.github.com/repos/golang/go/issues/16369/events","html_url":"https://github.com/golang/go/issues/16369","id":165531408,"number":16369,"title":"Interface definition cannot contain itself as a method argument","user":{"login":"juamedgod","id":1295175,"avatar_url":"https://avatars.githubusercontent.com/u/1295175?v=3","gravatar_id":"","url":"https://api.github.com/users/juamedgod","html_url":"https://github.com/juamedgod","followers_url":"https://api.github.com/users/juamedgod/followers","following_url":"https://api.github.com/users/juamedgod/following{/other_user}","gists_url":"https://api.github.com/users/juamedgod/gists{/gist_id}","starred_url":"https://api.github.com/users/juamedgod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juamedgod/subscriptions","organizations_url":"https://api.github.com/users/juamedgod/orgs","repos_url":"https://api.github.com/users/juamedgod/repos","events_url":"https://api.github.com/users/juamedgod/events{/privacy}","received_events_url":"https://api.github.com/users/juamedgod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false},"assignees":[{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-07-14T10:43:39Z","updated_at":"2016-07-14T13:22:32Z","closed_at":null,"body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n1. What version of Go are you using (`go version`)?\r\n\r\n`go1.6.2`\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\n```\r\nGOARCH=\"amd64\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"linux\"\r\nGOOS=\"linux\"\r\n```\r\n3. What did you do?\r\n\r\nI tried to define an interface that expects itself as the argument of one of its methods:\r\n\r\n```\r\ntype Nestable interface {\r\n   AddChild(interface{Nestable})\r\n}\r\n```\r\nhttps://play.golang.org/p/oB091DHIS2\r\n\r\n4. What did you expect to see?\r\n\r\nI would expect it to simply look for the desired signature of the argument passed in and accept it as valid\r\n\r\n5. What did you see instead?\r\n\r\nIt seems it recursively walk the full interface definition so it enters som kind of loop\r\n\r\n```\r\npanic: interface conversion: *main.TreeNode is not interface { AddChild(interface { AddChild(interface { AddChild(interface { AddChild(interface { AddChild(interface { AddChild<...> }) }) }) }) }) }: missing method AddChild\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/232663556","html_url":"https://github.com/golang/go/issues/16369#issuecomment-232663556","issue_url":"https://api.github.com/repos/golang/go/issues/16369","id":232663556,"user":{"login":"mvdan","id":3576549,"avatar_url":"https://avatars.githubusercontent.com/u/3576549?v=3","gravatar_id":"","url":"https://api.github.com/users/mvdan","html_url":"https://github.com/mvdan","followers_url":"https://api.github.com/users/mvdan/followers","following_url":"https://api.github.com/users/mvdan/following{/other_user}","gists_url":"https://api.github.com/users/mvdan/gists{/gist_id}","starred_url":"https://api.github.com/users/mvdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvdan/subscriptions","organizations_url":"https://api.github.com/users/mvdan/orgs","repos_url":"https://api.github.com/users/mvdan/repos","events_url":"https://api.github.com/users/mvdan/events{/privacy}","received_events_url":"https://api.github.com/users/mvdan/received_events","type":"User","site_admin":false},"created_at":"2016-07-14T13:22:32Z","updated_at":"2016-07-14T13:22:32Z","body":"Error on tip (`go version devel +fc80387 Mon Jul 11 21:03:09 2016 +0000 linux/amd64`) is different:\r\n\r\n```\r\nruntime: goroutine stack exceeds 1000000000-byte limit\r\nfatal error: stack overflow\r\n\r\nruntime stack:\r\nruntime.throw(0x8f8c67, 0xe)\r\n        /home/mvdan/tip/src/runtime/panic.go:566 +0x95\r\nruntime.newstack()\r\n        /home/mvdan/tip/src/runtime/stack.go:1061 +0x416\r\nruntime.morestack()\r\n        /home/mvdan/tip/src/runtime/asm_amd64.s:366 +0x7f\r\n\r\ngoroutine 1 [running]:\r\nencoding/binary.PutVarint(0xc440484316, 0xa, 0xa, 0xfffffffffffffff2, 0x0)\r\n        /home/mvdan/tip/src/encoding/binary/varint.go:78 fp=0xc4404842d8 sp=0xc4404842d0\r\ncmd/compile/internal/gc.(*exporter).rawInt64(0xc460483890, 0xfffffffffffffff2)\r\n        /home/mvdan/tip/src/cmd/compile/internal/gc/bexport.go:1712 +0x5d fp=0xc440484330 sp=0xc4404842d8\r\ncmd/compile/internal/gc.(*exporter).tag(0xc460483890, 0xfffffffffffffff2)\r\n        /home/mvdan/tip/src/cmd/compile/internal/gc/bexport.go:1658 +0x101 fp=0xc440484380 sp=0xc440484330\r\ncmd/compile/internal/gc.(*exporter).typ(0xc460483890, 0xc420417590)\r\n        /home/mvdan/tip/src/cmd/compile/internal/gc/bexport.go:792 +0xeb3 fp=0xc4404844e8 sp=0xc440484380\r\ncmd/compile/internal/gc.(*exporter).param(0xc460483890, 0xc42040eac0, 0xffffffffffffffff, 0x0)\r\n        [...]\r\n```"}}
{"actor":{"display_login":"mvdan"}}