{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/40","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/40/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/40/events","html_url":"https://github.com/dotnet/roslyn/issues/40","id":54805148,"number":40,"title":"Unable to compile constant declaration with self-referencing nameof expression","user":{"login":"controlflow","id":194765,"avatar_url":"https://avatars.githubusercontent.com/u/194765?v=3","gravatar_id":"","url":"https://api.github.com/users/controlflow","html_url":"https://github.com/controlflow","followers_url":"https://api.github.com/users/controlflow/followers","following_url":"https://api.github.com/users/controlflow/following{/other_user}","gists_url":"https://api.github.com/users/controlflow/gists{/gist_id}","starred_url":"https://api.github.com/users/controlflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/controlflow/subscriptions","organizations_url":"https://api.github.com/users/controlflow/orgs","repos_url":"https://api.github.com/users/controlflow/repos","events_url":"https://api.github.com/users/controlflow/events{/privacy}","received_events_url":"https://api.github.com/users/controlflow/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/2%20-%20Ready","name":"2 - Ready","color":"CCCCCC"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Compilers","name":"Area-Compilers","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Language-C%23","name":"Language-C#","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/6","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/6/labels","id":956299,"number":6,"title":"1.0-rc2","description":"\r\n\r\n<!---\r\n@huboard:{\"order\":0.5}\r\n-->\r\n","creator":{"login":"theoy","id":8222470,"avatar_url":"https://avatars.githubusercontent.com/u/8222470?v=3","gravatar_id":"","url":"https://api.github.com/users/theoy","html_url":"https://github.com/theoy","followers_url":"https://api.github.com/users/theoy/followers","following_url":"https://api.github.com/users/theoy/following{/other_user}","gists_url":"https://api.github.com/users/theoy/gists{/gist_id}","starred_url":"https://api.github.com/users/theoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theoy/subscriptions","organizations_url":"https://api.github.com/users/theoy/orgs","repos_url":"https://api.github.com/users/theoy/repos","events_url":"https://api.github.com/users/theoy/events{/privacy}","received_events_url":"https://api.github.com/users/theoy/received_events","type":"User","site_admin":false},"open_issues":48,"closed_issues":33,"state":"open","created_at":"2015-01-29T06:19:12Z","updated_at":"2015-02-13T23:48:41Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-01-19T19:52:56Z","updated_at":"2015-02-14T00:44:59Z","closed_at":null,"body":"```\r\nconst string N = nameof(N);\r\n```\r\nCurrently this code won't compile because of:\r\n\r\n> error CS0110: The evaluation of the constant value for 'C.N' involves a circular definition\r\n\r\nBut there is no actual circular reference in **evaluation** of constant value.\r\nI'm expecting this code to compile fine and constant `N` to have value `\"N\"`.\r\n\r\n<!---\r\n@huboard:{\"order\":7.5,\"milestone_order\":40,\"custom_state\":\"\"}\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/74352164","html_url":"https://github.com/dotnet/roslyn/issues/40#issuecomment-74352164","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/40","id":74352164,"user":{"login":"gafter","id":3804346,"avatar_url":"https://avatars.githubusercontent.com/u/3804346?v=3","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T00:44:59Z","updated_at":"2015-02-14T00:44:59Z","body":"@sharwell The spec and implementation of nameof() changed since CTP 4. It used to be a custom syntax and we used to use lookup, but that made the lookup rules complicated and inconsistent because of the custom syntax. The argument is now syntactically an expression and we simply bind it. This error is a consequence of binding the expression in the context of the constant's initializer."}}