{"action":"created","issue":{"url":"https://api.github.com/repos/erikdoe/ocmock/issues/222","labels_url":"https://api.github.com/repos/erikdoe/ocmock/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/erikdoe/ocmock/issues/222/comments","events_url":"https://api.github.com/repos/erikdoe/ocmock/issues/222/events","html_url":"https://github.com/erikdoe/ocmock/pull/222","id":101269618,"number":222,"title":"Silence build error when using typed mock","user":{"login":"ole","id":5010,"avatar_url":"https://avatars.githubusercontent.com/u/5010?v=3","gravatar_id":"","url":"https://api.github.com/users/ole","html_url":"https://github.com/ole","followers_url":"https://api.github.com/users/ole/followers","following_url":"https://api.github.com/users/ole/following{/other_user}","gists_url":"https://api.github.com/users/ole/gists{/gist_id}","starred_url":"https://api.github.com/users/ole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ole/subscriptions","organizations_url":"https://api.github.com/users/ole/orgs","repos_url":"https://api.github.com/users/ole/repos","events_url":"https://api.github.com/users/ole/events{/privacy}","received_events_url":"https://api.github.com/users/ole/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-16T14:33:52Z","updated_at":"2015-08-16T14:39:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/erikdoe/ocmock/pulls/222","html_url":"https://github.com/erikdoe/ocmock/pull/222","diff_url":"https://github.com/erikdoe/ocmock/pull/222.diff","patch_url":"https://github.com/erikdoe/ocmock/pull/222.patch"},"body":"Consider the following test:\r\n\r\n```objc\r\nid <NSLocking> mock = OCMStrictProtocolMock(@protocol(NSLocking));\r\nOCMExpect([mock lock]);\r\n\r\n[mock lock];\r\n\r\nOCMVerifyAll(mock);\r\n// error: No known instance method for selector 'verifyAtLocation:'\r\n```\r\n\r\nBecause we have given the mock object a type of `id <NSLocking>` instead of just `id` (which is helpful for documentation and code completion etc. when writing the test), the call to `OCMVerifyAll()` doesn't compile because of a type mismatch.\r\n\r\nThe fix casts the mock object explicitly to OCMockObject in the\r\nOCMVerifyAll() and OCMVerifyWithDelay() macros."},"comment":{"url":"https://api.github.com/repos/erikdoe/ocmock/issues/comments/131562396","html_url":"https://github.com/erikdoe/ocmock/pull/222#issuecomment-131562396","issue_url":"https://api.github.com/repos/erikdoe/ocmock/issues/222","id":131562396,"user":{"login":"ole","id":5010,"avatar_url":"https://avatars.githubusercontent.com/u/5010?v=3","gravatar_id":"","url":"https://api.github.com/users/ole","html_url":"https://github.com/ole","followers_url":"https://api.github.com/users/ole/followers","following_url":"https://api.github.com/users/ole/following{/other_user}","gists_url":"https://api.github.com/users/ole/gists{/gist_id}","starred_url":"https://api.github.com/users/ole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ole/subscriptions","organizations_url":"https://api.github.com/users/ole/orgs","repos_url":"https://api.github.com/users/ole/repos","events_url":"https://api.github.com/users/ole/events{/privacy}","received_events_url":"https://api.github.com/users/ole/received_events","type":"User","site_admin":false},"created_at":"2015-08-16T14:39:11Z","updated_at":"2015-08-16T14:39:11Z","body":"I'm not sure why the Travis build failed as I haven't changed anything in the file with the failing test. On my machine all tests succeed."}}