{"action":"closed","issue":{"url":"https://api.github.com/repos/immutables/immutables/issues/196","labels_url":"https://api.github.com/repos/immutables/immutables/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/immutables/immutables/issues/196/comments","events_url":"https://api.github.com/repos/immutables/immutables/issues/196/events","html_url":"https://github.com/immutables/immutables/issues/196","id":116024032,"number":196,"title":"Derived->Default dependency is broken","user":{"login":"almozavr","id":780153,"avatar_url":"https://avatars.githubusercontent.com/u/780153?v=3","gravatar_id":"","url":"https://api.github.com/users/almozavr","html_url":"https://github.com/almozavr","followers_url":"https://api.github.com/users/almozavr/followers","following_url":"https://api.github.com/users/almozavr/following{/other_user}","gists_url":"https://api.github.com/users/almozavr/gists{/gist_id}","starred_url":"https://api.github.com/users/almozavr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/almozavr/subscriptions","organizations_url":"https://api.github.com/users/almozavr/orgs","repos_url":"https://api.github.com/users/almozavr/repos","events_url":"https://api.github.com/users/almozavr/events{/privacy}","received_events_url":"https://api.github.com/users/almozavr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/immutables/immutables/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/immutables/immutables/labels/completed","name":"completed","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/immutables/immutables/milestones/18","html_url":"https://github.com/immutables/immutables/milestones/2.1.1","labels_url":"https://api.github.com/repos/immutables/immutables/milestones/18/labels","id":1424305,"number":18,"title":"2.1.1","description":"","creator":{"login":"elucash","id":1692611,"avatar_url":"https://avatars.githubusercontent.com/u/1692611?v=3","gravatar_id":"","url":"https://api.github.com/users/elucash","html_url":"https://github.com/elucash","followers_url":"https://api.github.com/users/elucash/followers","following_url":"https://api.github.com/users/elucash/following{/other_user}","gists_url":"https://api.github.com/users/elucash/gists{/gist_id}","starred_url":"https://api.github.com/users/elucash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elucash/subscriptions","organizations_url":"https://api.github.com/users/elucash/orgs","repos_url":"https://api.github.com/users/elucash/repos","events_url":"https://api.github.com/users/elucash/events{/privacy}","received_events_url":"https://api.github.com/users/elucash/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":15,"state":"open","created_at":"2015-11-23T05:43:57Z","updated_at":"2015-12-04T08:13:51Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-11-10T04:34:11Z","updated_at":"2015-12-04T08:13:51Z","closed_at":"2015-12-04T08:13:51Z","body":"During `MyItem.from(anotherMyItem)` `@Derived` attr got wrong `@Default` value: seems like it calls default impl. while it's (non-default) value haven't been copied yet. \r\n```java\r\n@Value.Immutable\r\nabstract class MyItem {\r\n    @Value.Derived public String index() {\r\n        return uuid() + \"!!!\";\r\n    }\r\n\r\n    @Value.Default public String uuid() {\r\n        return UUID.randomUUID().toString();\r\n    }\r\n\r\n    String title();\r\n}\r\n...\r\nMyItem source = ImmutableMyItem.builder().title(\"1\").build(); // uuid is 5 e.g., index = 5!!!\r\nMyItem replica =  ImmutableMyItem.copyOf(source).withTitle(\"2\"); // replica's uuid = 5, index = *randomValue*!!!\r\n...\r\n```\r\nProblem resides in constructor which is called from `withTitle()` - there is a call to `super.index()` and to `uuid()` as well, but `uuid()` uses `initShim` by that moment which is `not null`, so wrong value is applied."}}