{"action":"opened","issue":{"url":"https://api.github.com/repos/ponylang/ponyc/issues/1469","repository_url":"https://api.github.com/repos/ponylang/ponyc","labels_url":"https://api.github.com/repos/ponylang/ponyc/issues/1469/labels{/name}","comments_url":"https://api.github.com/repos/ponylang/ponyc/issues/1469/comments","events_url":"https://api.github.com/repos/ponylang/ponyc/issues/1469/events","html_url":"https://github.com/ponylang/ponyc/issues/1469","id":194829610,"number":1469,"title":"Iso reference leaks to two different actors","user":{"login":"mlajszczak","id":6353317,"avatar_url":"https://avatars.githubusercontent.com/u/6353317?v=3","gravatar_id":"","url":"https://api.github.com/users/mlajszczak","html_url":"https://github.com/mlajszczak","followers_url":"https://api.github.com/users/mlajszczak/followers","following_url":"https://api.github.com/users/mlajszczak/following{/other_user}","gists_url":"https://api.github.com/users/mlajszczak/gists{/gist_id}","starred_url":"https://api.github.com/users/mlajszczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlajszczak/subscriptions","organizations_url":"https://api.github.com/users/mlajszczak/orgs","repos_url":"https://api.github.com/users/mlajszczak/repos","events_url":"https://api.github.com/users/mlajszczak/events{/privacy}","received_events_url":"https://api.github.com/users/mlajszczak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-11T12:34:55Z","updated_at":"2016-12-11T12:34:55Z","closed_at":null,"body":"The following piece of code compiles:\r\n\r\n```pony\r\nuse \"debug\"\r\n\r\nactor Foo\r\n  be foo(arg: String iso) =>\r\n    arg.append(\"foo\")\r\n    Debug.out(\"in Foo: \" + arg.string())\r\n\r\nclass Bar\r\n  var data: String ref = String\r\n\r\n  fun ref bar() =>\r\n    data.append(\"bar\")\r\n    Debug.out(\"in Bar: \" + data)\r\n\r\nactor Main\r\n  new create(env: Env) =>\r\n    let s = recover String end\r\n    let bar = Bar\r\n    bar.data = s\r\n\r\n    Foo.foo(consume s)\r\n    bar.bar()\r\n```\r\n\r\nHowever, before `s` was consumed and sent to Foo, it was assigned to a field of `Bar` instance (without consuming) and compiler didn't complain. Now, we have a reference to the same string in both Main and Foo and both of them modify its content."}}
{"actor":{"display_login":"mlajszczak"}}