{"action":"opened","issue":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1312","repository_url":"https://api.github.com/repos/elm-lang/elm-compiler","labels_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1312/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1312/comments","events_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1312/events","html_url":"https://github.com/elm-lang/elm-compiler/issues/1312","id":140045441,"number":1312,"title":"'undefined' value","user":{"login":"idubrov","id":434788,"avatar_url":"https://avatars.githubusercontent.com/u/434788?v=3","gravatar_id":"","url":"https://api.github.com/users/idubrov","html_url":"https://github.com/idubrov","followers_url":"https://api.github.com/users/idubrov/followers","following_url":"https://api.github.com/users/idubrov/following{/other_user}","gists_url":"https://api.github.com/users/idubrov/gists{/gist_id}","starred_url":"https://api.github.com/users/idubrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idubrov/subscriptions","organizations_url":"https://api.github.com/users/idubrov/orgs","repos_url":"https://api.github.com/users/idubrov/repos","events_url":"https://api.github.com/users/idubrov/events{/privacy}","received_events_url":"https://api.github.com/users/idubrov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-11T00:04:30Z","updated_at":"2016-03-11T00:04:30Z","closed_at":null,"body":"In the following code, I get 'undefined' as a result of the 'func' call. Everything works fine if I rename 'outer' variable inside let...in into 'outer2'.\r\n\r\n```elm\r\ntype alias Inner =\r\n  { value : String }\r\n\r\n\r\ntype alias Outer =\r\n  { inner : Inner }\r\n\r\n\r\nupdateInnerValue : Outer -> Outer\r\nupdateInnerValue outer =\r\n  let\r\n    value =\r\n      \"bye\"\r\n\r\n    inner =\r\n      outer.inner\r\n\r\n    outer =\r\n      { outer | inner = { inner | value = value } }\r\n  in\r\n    outer\r\n\r\n\r\nfunc =\r\n  (updateInnerValue { inner = { value = \"hello\" } }).inner.value\r\n```"}}