{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/dafny/issues/194","repository_url":"https://api.github.com/repos/Microsoft/dafny","labels_url":"https://api.github.com/repos/Microsoft/dafny/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/dafny/issues/194/comments","events_url":"https://api.github.com/repos/Microsoft/dafny/issues/194/events","html_url":"https://github.com/Microsoft/dafny/issues/194","id":315467068,"number":194,"title":"Post-condition using boolean values in constructor not verified by Dafny","user":{"login":"costaseco","id":17333226,"avatar_url":"https://avatars3.githubusercontent.com/u/17333226?v=4","gravatar_id":"","url":"https://api.github.com/users/costaseco","html_url":"https://github.com/costaseco","followers_url":"https://api.github.com/users/costaseco/followers","following_url":"https://api.github.com/users/costaseco/following{/other_user}","gists_url":"https://api.github.com/users/costaseco/gists{/gist_id}","starred_url":"https://api.github.com/users/costaseco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/costaseco/subscriptions","organizations_url":"https://api.github.com/users/costaseco/orgs","repos_url":"https://api.github.com/users/costaseco/repos","events_url":"https://api.github.com/users/costaseco/events{/privacy}","received_events_url":"https://api.github.com/users/costaseco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-18T12:54:25Z","updated_at":"2018-04-19T02:28:44Z","closed_at":null,"author_association":"NONE","body":"When using a boolean instance variable, starting with false, the post-condition is not verified. If the value assigned in the constructor is false, it validates the post-condition. See example below.\r\n\r\nI'm using the Dafny Server that is installed by default with the Dafny VSCode Extension (0.11.1). The result is the same using the command line tool version (2.1.1.10209).\r\n\r\n```\r\nclass A {\r\n    var b:bool;\r\n    constructor() \r\n        ensures b == false // Cannot prove this post-condition\r\n    {\r\n        b := false;\r\n    }\r\n}\r\n\r\nclass B {\r\n    var b:bool;\r\n    constructor() \r\n        ensures b == true // Proves this one\r\n    {\r\n        b := true;\r\n    }\r\n}\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/dafny/issues/comments/382589751","html_url":"https://github.com/Microsoft/dafny/issues/194#issuecomment-382589751","issue_url":"https://api.github.com/repos/Microsoft/dafny/issues/194","id":382589751,"user":{"login":"RustanLeino","id":11763367,"avatar_url":"https://avatars3.githubusercontent.com/u/11763367?v=4","gravatar_id":"","url":"https://api.github.com/users/RustanLeino","html_url":"https://github.com/RustanLeino","followers_url":"https://api.github.com/users/RustanLeino/followers","following_url":"https://api.github.com/users/RustanLeino/following{/other_user}","gists_url":"https://api.github.com/users/RustanLeino/gists{/gist_id}","starred_url":"https://api.github.com/users/RustanLeino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RustanLeino/subscriptions","organizations_url":"https://api.github.com/users/RustanLeino/orgs","repos_url":"https://api.github.com/users/RustanLeino/repos","events_url":"https://api.github.com/users/RustanLeino/events{/privacy}","received_events_url":"https://api.github.com/users/RustanLeino/received_events","type":"User","site_admin":false},"created_at":"2018-04-19T02:28:44Z","updated_at":"2018-04-19T02:28:44Z","author_association":"COLLABORATOR","body":"I agree this is fascinating. Thanks for the bug report and the proposed diagnosis. I am currently on vacation (without a laptop) and am looking forward to looking into this when I come home."}}
{"actor":{"display_login":"RustanLeino"}}